3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $formData = array(); echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === \'0\': '; var_dump($formData['chain_id'] === '0'); echo "\n"; $formData['chain_id'] = 0 echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === \'0\': '; var_dump($formData['chain_id'] === '0'); echo "\n"; $formData['chain_id'] = 1 echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === \'0\': '; var_dump($formData['chain_id'] === '0'); echo "\n";
Output for 5.4.0 - 5.4.18
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/0poR7 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_ECHO in /in/0poR7 on line 11
Process exited with code 255.