Using AWS cloud9 linked to ubuntu Getting Bash error while running PHP

aruneshdutta

New Member
Joined
Jul 11, 2019
Messages
2
Reaction score
0
Credits
24
I just began using c9 tried running following php code with runner PHP-CLI getting bash error

running sample code :: https://docs.aws.amazon.com/cloud9/l...ample-php.html


(standard_in) 1: syntax error
bash: line 9: [: -eq: unary operator expected
Kindly guide how to fix
<?php
print(‘Hello, World!’);
print("\nThe sum of 2 and 3 is 5.");
$sum = (int)$argv[1] + (int)$argv[2];
print("\nThe sum of $argv[1] and $argv[2] is $sum.");
?>
Edit / Delete
 

Members online


Top