3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function calc_string($string) { $calc = create_function("", "return (" . preg_replace('[^0-9\+-\*\/\(\) ]', '', trim($string)) . ");" ); return $calc(); } echo calc_string("6 * ((26 / (2-3)) + -3) - 20");
based on p6Onv
Output for 7.2.0
Deprecated: Function create_function() is deprecated in /in/6W2IR on line 4 -194
Output for 4.3.0 - 7.1.10
-194