3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = time(); for ($i = 0; $i < 100000; $i++) { $s = str_repeat(' asd ', 1000); trim($s); } $diff = time() - $start; echo diff / 1000;
Output for 7.2.0
Warning: Use of undefined constant diff - assumed 'diff' (this will throw an Error in a future version of PHP) in /in/puiXW on line 12 Warning: A non-numeric value encountered in /in/puiXW on line 12 0
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant diff - assumed 'diff' in /in/puiXW on line 12 Warning: A non-numeric value encountered in /in/puiXW on line 12 0
Output for 4.3.0 - 7.0.20
Notice: Use of undefined constant diff - assumed 'diff' in /in/puiXW on line 12 0