3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.1
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.82290196418762 stripos: 1.5236790180206
Output for 7.3.0
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.7802300453186 stripos: 1.5085220336914
Output for 7.2.13
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0126659870148 stripos: 1.3278059959412
Output for 7.2.12
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1322870254517
Process exited with code 137.
Output for 7.2.11
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0595080852509
Process exited with code 137.
Output for 7.2.10
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1525528430939
Process exited with code 137.
Output for 7.2.9
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.034029006958
Process exited with code 137.
Output for 7.2.8
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1053538322449
Process exited with code 137.
Output for 7.2.7
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0273339748383
Process exited with code 137.
Output for 7.2.6
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0620341300964
Process exited with code 137.
Output for 7.2.5
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1725158691406
Process exited with code 137.
Output for 7.2.4
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1285979747772
Process exited with code 137.
Output for 7.2.3
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1400620937347
Process exited with code 137.
Output for 7.2.2
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0142831802368
Process exited with code 137.
Output for 7.2.1
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.0087249279022
Process exited with code 137.
Output for 7.2.0
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.1074659824371
Process exited with code 137.
Output for 7.1.25
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 1.6509308815002
Process exited with code 137.
Output for 7.1.7
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.83234810829163 stripos: 1.2104198932648
Output for 7.1.6
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.9294331073761 stripos: 1.2716419696808
Output for 7.1.5
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.77383184432983 stripos: 1.1352570056915
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.20
Notice: Undefined variable: i in /in/9hlaq on line 4 preg_match: 0.82782793045044 stripos: 1.5588700771332
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.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Notice: Undefined variable: i in /in/9hlaq on line 4
Process exited with code 137.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.3
Notice: Undefined variable: i in /in/9hlaq on line 4
Process exited with code 137.

preferences:
166.01 ms | 402 KiB | 232 Q