eval.in

Paste #5552

PHP — PHP 5.4.6, pasted 1 year ago

1
2
3
4
5
<?php

$total_cost = 'string value';

echo $total_cost['option 1'];

Program Output

Warning: Illegal string offset 'option 1' in /tmp/execpad-e5fef97bd3c4/source-e5fef97bd3c4 on line 5
s

OK (0.004 sec real, 0.005 sec wall, 13 MB, 43 syscalls)

Fork