3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $class = 'Concrete5_Controller_Name'; // Let's warm up while(++$i < 1000000) { if(0) {} } // Test 'else if' $i = 0; $start = microtime(true); while(++$i < 10000000) { preg_match('/^Concrete5_Model_(.*)/i', $class); } $end = microtime(true); echo "preg_match: ".($end - $start)."\n"; unset($start, $end); // Test 'elseif' $i = 0; $start = microtime(true); while(++$i < 10000000) { stripos($class, 'Concrete5_Model_'); } $end = microtime(true); echo "stripos: ".($end - $start);
Output for 7.1.0
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0595021247864
Process exited with code 137.
Output for 7.0.14
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: -0.60141015052795 stripos: 2.6070671081543
Output for 7.0.10
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.2754120826721 stripos: 0.91756916046143
Output for 7.0.9
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.274078130722 stripos: 0.93883490562439
Output for 7.0.8
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.2791020870209 stripos: 1.1182839870453
Output for 7.0.7
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1531238555908 stripos: 0.9341869354248
Output for 7.0.6
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.3037118911743
Process exited with code 137.
Output for 7.0.5
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.2809071540833 stripos: 0.93217086791992
Output for 7.0.4
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.3755359649658 stripos: 0.92652201652527
Output for 7.0.3
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.2631819248199 stripos: 0.95231294631958
Output for 7.0.2
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.3468549251556 stripos: 0.9712610244751
Output for 7.0.1
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.3530478477478
Process exited with code 137.
Output for 7.0.0
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.248703956604 stripos: 0.9184889793396
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: i in /in/9hlaq on line 4
Process exited with code 137.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/9hlaq on line 4
Process exited with code 137.