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


New Member
I just began using c9 tried running following php code with runner PHP-CLI getting bash error

running sample code ::

(standard_in) 1: syntax error
bash: line 9: [: -eq: unary operator expected
Kindly guide how to fix
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