3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $p=$argv[1]; preg_match("/c([ao]+)/i",$p,$e); $l=strlen($e[1]); $s=($k=strcmp($e[0][1],o))?eo:oo; echo $p,' go M',str_repeat($s[0],$l),str_repeat($s[1],$l),$k?w:'';
Output for 7.2.0
Notice: Undefined offset: 1 in /in/MdbB2 on line 3 Notice: Undefined offset: 1 in /in/MdbB2 on line 5 Notice: Undefined offset: 0 in /in/MdbB2 on line 6 Warning: Use of undefined constant o - assumed 'o' (this will throw an Error in a future version of PHP) in /in/MdbB2 on line 6 Warning: Use of undefined constant eo - assumed 'eo' (this will throw an Error in a future version of PHP) in /in/MdbB2 on line 6 go M Warning: Use of undefined constant w - assumed 'w' (this will throw an Error in a future version of PHP) in /in/MdbB2 on line 7 w
Output for 5.3.21 - 7.1.10
Notice: Undefined offset: 1 in /in/MdbB2 on line 3 Notice: Undefined offset: 1 in /in/MdbB2 on line 5 Notice: Undefined offset: 0 in /in/MdbB2 on line 6 Notice: Use of undefined constant o - assumed 'o' in /in/MdbB2 on line 6 Notice: Use of undefined constant eo - assumed 'eo' in /in/MdbB2 on line 6 go M Notice: Use of undefined constant w - assumed 'w' in /in/MdbB2 on line 7 w