3v4l.org

run code in 300+ PHP versions simultaneously
<?php $idx = (object) [ 'k' => [[3], [2,4]] ]; $idx->k[0] = [2] print_r($idx);
Output for 5.6.0 - 5.6.25, 7.0.0 - 7.0.10
Parse error: syntax error, unexpected 'print_r' (T_STRING) in /in/2Qv8k on line 8
Process exited with code 255.

preferences:
176.52 ms | 1395 KiB | 44 Q