3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg=$_GET['msg']??"no msg!"; file_put_contents('msg.log.txt',$msg."\r\n",FILE_APPEND|LOCK_EX); $matches=NULL; $isMatch=preg_match("/\d+\s*(?:\+|\-|\*|\/|\:)\s*\d+/",$msg,$matches); if($isMatch){ $matches[0]=strtr($matches[0],array(':'=>'/')); //var_dump($matches) & die(); $res=eval("return (".$matches[0].");"); // var_dump($res); echo "!check {$res}"; }

preferences:
85.86 ms | 402 KiB | 5 Q