3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a= "@table(hello)"; $b = "@column"; list($key, $value) = explode("(", rtrim($a, ")")); var_dump($key); var_dump($value); list($key, $value) = explode("(", rtrim($b, ")")); var_dump($key); var_dump($value);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
string(6) "@table" string(5) "hello" Notice: Undefined offset: 1 in /in/4FmL8 on line 9 string(7) "@column" NULL
Output for hhvm-3.10.0 - 3.12.0
string(6) "@table" string(5) "hello" Notice: Undefined index: 1 in /in/4FmL8 on line 9 string(7) "@column" NULL
Output for 4.3.0 - 5.2.17
string(6) "@table" string(5) "hello" Notice: Undefined offset: 1 in /in/4FmL8 on line 9 string(7) "@column" NULL