3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(version_compare(PHP_VERSION, '5.0') <= 0) { die('Skipped'); } // Setup $class = 'Concrete5_Model_User'; $count = 10000; // Warm up for($i = 0; $i < $count; $i++) { strpos($class, 'Concrete5_Model_'); } // Test - case sensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(strpos($class, 'Concrete5_Model_') === 0) { } } $deltaCS = microtime(true) - $t0; // Test - case insensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(stripos($class, 'Concrete5_Model_') === 0) { } } $deltaCI = microtime(true) - $t0; // Test - substr $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(substr($class, 16) === 'Concrete5_Model_') { } } $deltaSS = microtime(true) - $t0; echo "case sensitive: ", round($deltaCS * 1000, 2), " ms\n"; echo "case insensitive: ", round($deltaCI * 1000, 2), " ms\n"; echo "case substring: ", round($deltaSS * 1000, 2), " ms\n"; echo "case sensitive gain: ", round($deltaCI * 100 / $deltaCS - 100, 2), " %\n";
Output for 7.1.0
case sensitive: 0.39 ms case insensitive: 1.15 ms case substring: 0.4 ms case sensitive gain: 197.54 %
Output for 7.0.14
case sensitive: 0.87 ms case insensitive: 2.68 ms case substring: 0.94 ms case sensitive gain: 208.86 %
Output for 7.0.6
case sensitive: 0.46 ms case insensitive: 1.43 ms case substring: 0.52 ms case sensitive gain: 209.1 %
Output for 7.0.5
case sensitive: 0.38 ms case insensitive: 1.18 ms case substring: 0.43 ms case sensitive gain: 206.91 %
Output for 7.0.4
case sensitive: 0.39 ms case insensitive: 1.19 ms case substring: 0.43 ms case sensitive gain: 209.04 %
Output for 7.0.3
case sensitive: 0.37 ms case insensitive: 1.19 ms case substring: 0.41 ms case sensitive gain: 219.12 %
Output for 7.0.2
case sensitive: 0.71 ms case insensitive: 1.85 ms case substring: 0.54 ms case sensitive gain: 158.98 %
Output for 7.0.1
case sensitive: 0.57 ms case insensitive: 1.75 ms case substring: 0.66 ms case sensitive gain: 209.9 %
Output for 7.0.0
case sensitive: 0.55 ms case insensitive: 1.7 ms case substring: 0.63 ms case sensitive gain: 210.46 %
Output for hhvm-3.12.0
case sensitive: 1.46 ms case insensitive: 1.5 ms case substring: 1.41 ms case sensitive gain: 2.33 %
Output for hhvm-3.10.0
case sensitive: 1.36 ms case insensitive: 1.39 ms case substring: 1.36 ms case sensitive gain: 1.75 %
Output for 5.6.28
case sensitive: 3.04 ms case insensitive: 4.4 ms case substring: 2.68 ms case sensitive gain: 44.54 %
Output for 5.6.21
case sensitive: 1.27 ms case insensitive: 1.85 ms case substring: 1.26 ms case sensitive gain: 46.14 %
Output for 5.6.20
case sensitive: 1.95 ms case insensitive: 2.87 ms case substring: 1.95 ms case sensitive gain: 47.14 %
Output for 5.6.19
case sensitive: 1.87 ms case insensitive: 2.62 ms case substring: 1.83 ms case sensitive gain: 39.96 %
Output for 5.6.18
case sensitive: 1.26 ms case insensitive: 1.89 ms case substring: 1.27 ms case sensitive gain: 50.09 %
Output for 5.6.17
case sensitive: 1.28 ms case insensitive: 1.93 ms case substring: 1.31 ms case sensitive gain: 50.74 %
Output for 5.6.16
case sensitive: 1.93 ms case insensitive: 2.76 ms case substring: 1.84 ms case sensitive gain: 42.85 %
Output for 5.6.15
case sensitive: 2.06 ms case insensitive: 2.96 ms case substring: 2.01 ms case sensitive gain: 43.96 %
Output for 5.6.14
case sensitive: 1.64 ms case insensitive: 2.97 ms case substring: 1.6 ms case sensitive gain: 81.63 %
Output for 5.6.13
case sensitive: 2.01 ms case insensitive: 2.8 ms case substring: 1.88 ms case sensitive gain: 39.65 %
Output for 5.6.12
case sensitive: 1.85 ms case insensitive: 2.63 ms case substring: 1.81 ms case sensitive gain: 42.14 %
Output for 5.6.11
case sensitive: 2.22 ms case insensitive: 3.1 ms case substring: 1.9 ms case sensitive gain: 39.9 %
Output for 5.6.10
case sensitive: 1.91 ms case insensitive: 3.44 ms case substring: 1.78 ms case sensitive gain: 80.08 %
Output for 5.6.9
case sensitive: 1.9 ms case insensitive: 2.78 ms case substring: 1.87 ms case sensitive gain: 46.28 %
Output for 5.6.8
case sensitive: 1.3 ms case insensitive: 1.92 ms case substring: 1.36 ms case sensitive gain: 47.81 %
Output for 5.5.35
case sensitive: 1.33 ms case insensitive: 1.95 ms case substring: 1.35 ms case sensitive gain: 46.75 %
Output for 5.5.34
case sensitive: 2.05 ms case insensitive: 3.12 ms case substring: 2.02 ms case sensitive gain: 52 %
Output for 5.5.33
case sensitive: 1.28 ms case insensitive: 1.89 ms case substring: 1.3 ms case sensitive gain: 47.99 %
Output for 5.5.32
case sensitive: 1.87 ms case insensitive: 2.73 ms case substring: 1.88 ms case sensitive gain: 46.09 %
Output for 5.5.31
case sensitive: 2.54 ms case insensitive: 3.32 ms case substring: 2.47 ms case sensitive gain: 30.92 %
Output for 5.5.30
case sensitive: 1.36 ms case insensitive: 1.98 ms case substring: 1.38 ms case sensitive gain: 46.11 %
Output for 5.5.29
case sensitive: 2.12 ms case insensitive: 3.09 ms case substring: 2.11 ms case sensitive gain: 45.35 %
Output for 5.5.28
case sensitive: 2.07 ms case insensitive: 3.01 ms case substring: 2.06 ms case sensitive gain: 45.47 %
Output for 5.5.27
case sensitive: 1.48 ms case insensitive: 2.08 ms case substring: 1.47 ms case sensitive gain: 40.45 %
Output for 5.5.26
case sensitive: 1.54 ms case insensitive: 2.24 ms case substring: 1.54 ms case sensitive gain: 45.48 %
Output for 5.5.25
case sensitive: 2 ms case insensitive: 2.77 ms case substring: 1.91 ms case sensitive gain: 38.64 %
Output for 5.5.24
case sensitive: 2.07 ms case insensitive: 2.78 ms case substring: 1.95 ms case sensitive gain: 34.2 %
Output for 5.4.45
case sensitive: 1.3 ms case insensitive: 1.85 ms case substring: 1.26 ms case sensitive gain: 41.86 %
Output for 5.4.44
case sensitive: 1.23 ms case insensitive: 1.79 ms case substring: 1.2 ms case sensitive gain: 45.24 %
Output for 5.4.43
case sensitive: 1.18 ms case insensitive: 1.88 ms case substring: 1.24 ms case sensitive gain: 58.78 %
Output for 5.4.42
case sensitive: 1.29 ms case insensitive: 1.88 ms case substring: 1.26 ms case sensitive gain: 45.69 %
Output for 5.4.41
case sensitive: 2.82 ms case insensitive: 4.11 ms case substring: 2.82 ms case sensitive gain: 45.73 %
Output for 5.4.40
case sensitive: 1.51 ms case insensitive: 2.17 ms case substring: 1.51 ms case sensitive gain: 44.1 %
Output for 5.4.39
case sensitive: 1.28 ms case insensitive: 1.84 ms case substring: 1.27 ms case sensitive gain: 43.64 %
Output for 5.4.38
case sensitive: 1.3 ms case insensitive: 1.89 ms case substring: 1.3 ms case sensitive gain: 45.73 %
Output for 5.4.37
case sensitive: 1.29 ms case insensitive: 1.85 ms case substring: 1.29 ms case sensitive gain: 42.73 %
Output for 5.4.36
case sensitive: 1.71 ms case insensitive: 2.11 ms case substring: 1.48 ms case sensitive gain: 23.41 %
Output for 5.4.35
case sensitive: 1.31 ms case insensitive: 1.89 ms case substring: 1.28 ms case sensitive gain: 43.9 %
Output for 5.4.34
case sensitive: 1.29 ms case insensitive: 1.86 ms case substring: 1.28 ms case sensitive gain: 44.83 %
Output for 5.4.32
case sensitive: 1.27 ms case insensitive: 1.86 ms case substring: 1.29 ms case sensitive gain: 45.98 %
Output for 5.4.31
case sensitive: 1.51 ms case insensitive: 2.58 ms case substring: 1.3 ms case sensitive gain: 70.71 %
Output for 5.4.30
case sensitive: 1.26 ms case insensitive: 1.83 ms case substring: 1.28 ms case sensitive gain: 44.45 %
Output for 5.4.29
case sensitive: 1.28 ms case insensitive: 1.85 ms case substring: 1.26 ms case sensitive gain: 44.37 %
Output for 5.4.28
case sensitive: 1.31 ms case insensitive: 1.92 ms case substring: 1.25 ms case sensitive gain: 46.52 %
Output for 5.4.27
case sensitive: 1.28 ms case insensitive: 1.93 ms case substring: 1.25 ms case sensitive gain: 50.91 %
Output for 5.4.26
case sensitive: 2 ms case insensitive: 2.34 ms case substring: 1.85 ms case sensitive gain: 16.82 %
Output for 5.4.25
case sensitive: 1.26 ms case insensitive: 1.85 ms case substring: 1.26 ms case sensitive gain: 46.47 %
Output for 5.4.24
case sensitive: 1.32 ms case insensitive: 1.9 ms case substring: 1.27 ms case sensitive gain: 43.77 %
Output for 5.4.23
case sensitive: 1.74 ms case insensitive: 2.89 ms case substring: 1.78 ms case sensitive gain: 65.77 %
Output for 5.4.22
case sensitive: 1.33 ms case insensitive: 1.84 ms case substring: 1.3 ms case sensitive gain: 39.15 %
Output for 5.4.21
case sensitive: 1.33 ms case insensitive: 1.92 ms case substring: 1.28 ms case sensitive gain: 44.5 %
Output for 5.4.20
case sensitive: 1.27 ms case insensitive: 1.89 ms case substring: 1.24 ms case sensitive gain: 48.36 %
Output for 5.4.19
case sensitive: 1.29 ms case insensitive: 1.83 ms case substring: 1.24 ms case sensitive gain: 41.99 %
Output for 5.4.18
case sensitive: 1.35 ms case insensitive: 1.94 ms case substring: 1.32 ms case sensitive gain: 43.76 %
Output for 5.4.17
case sensitive: 1.33 ms case insensitive: 1.93 ms case substring: 1.32 ms case sensitive gain: 44.58 %
Output for 5.4.16
case sensitive: 1.3 ms case insensitive: 1.92 ms case substring: 1.31 ms case sensitive gain: 48.04 %
Output for 5.4.15
case sensitive: 1.3 ms case insensitive: 1.92 ms case substring: 1.27 ms case sensitive gain: 47.32 %
Output for 5.4.14
case sensitive: 1.3 ms case insensitive: 1.9 ms case substring: 1.29 ms case sensitive gain: 45.42 %
Output for 5.4.13
case sensitive: 1.37 ms case insensitive: 1.85 ms case substring: 1.31 ms case sensitive gain: 35.44 %
Output for 5.4.12
case sensitive: 1.3 ms case insensitive: 1.9 ms case substring: 1.25 ms case sensitive gain: 45.98 %
Output for 5.4.11
case sensitive: 1.35 ms case insensitive: 1.87 ms case substring: 1.29 ms case sensitive gain: 38.1 %
Output for 5.4.10
case sensitive: 1.3 ms case insensitive: 1.85 ms case substring: 1.25 ms case sensitive gain: 41.98 %
Output for 5.4.9
case sensitive: 1.91 ms case insensitive: 2.65 ms case substring: 1.76 ms case sensitive gain: 39.02 %
Output for 5.4.8
case sensitive: 1.32 ms case insensitive: 1.97 ms case substring: 1.27 ms case sensitive gain: 49.04 %
Output for 5.4.7
case sensitive: 1.3 ms case insensitive: 1.97 ms case substring: 1.28 ms case sensitive gain: 51.07 %
Output for 5.4.6
case sensitive: 1.58 ms case insensitive: 2.07 ms case substring: 2.03 ms case sensitive gain: 31.05 %
Output for 5.4.5
case sensitive: 2.05 ms case insensitive: 2.53 ms case substring: 1.83 ms case sensitive gain: 23.64 %
Output for 5.4.4
case sensitive: 1.33 ms case insensitive: 1.95 ms case substring: 1.29 ms case sensitive gain: 46.4 %
Output for 5.4.3
case sensitive: 1.29 ms case insensitive: 1.97 ms case substring: 1.26 ms case sensitive gain: 53.05 %
Output for 5.4.2
case sensitive: 1.31 ms case insensitive: 1.99 ms case substring: 1.28 ms case sensitive gain: 52.59 %
Output for 5.4.1
case sensitive: 1.29 ms case insensitive: 1.96 ms case substring: 1.25 ms case sensitive gain: 51.32 %
Output for 5.4.0
case sensitive: 1.28 ms case insensitive: 1.96 ms case substring: 1.27 ms case sensitive gain: 53.46 %
Output for 5.3.29
case sensitive: 1.6 ms case insensitive: 2.15 ms case substring: 1.44 ms case sensitive gain: 34.99 %
Output for 5.3.28
case sensitive: 1.64 ms case insensitive: 2.17 ms case substring: 1.55 ms case sensitive gain: 32.43 %
Output for 5.3.27
case sensitive: 1.63 ms case insensitive: 2.14 ms case substring: 1.48 ms case sensitive gain: 30.83 %
Output for 5.3.26
case sensitive: 1.83 ms case insensitive: 2.42 ms case substring: 1.45 ms case sensitive gain: 32.23 %
Output for 5.3.25
case sensitive: 1.62 ms case insensitive: 2.14 ms case substring: 1.46 ms case sensitive gain: 32 %
Output for 5.3.24
case sensitive: 1.62 ms case insensitive: 2.16 ms case substring: 1.48 ms case sensitive gain: 32.98 %
Output for 5.3.23
case sensitive: 1.61 ms case insensitive: 2.13 ms case substring: 1.46 ms case sensitive gain: 32.52 %
Output for 5.3.22
case sensitive: 1.67 ms case insensitive: 2.22 ms case substring: 1.53 ms case sensitive gain: 33.41 %
Output for 5.3.21
case sensitive: 1.68 ms case insensitive: 3.83 ms case substring: 2.39 ms case sensitive gain: 127.93 %
Output for 5.3.20
case sensitive: 1.71 ms case insensitive: 2.25 ms case substring: 1.55 ms case sensitive gain: 31.84 %
Output for 5.3.19
case sensitive: 1.67 ms case insensitive: 2.15 ms case substring: 1.51 ms case sensitive gain: 28.07 %
Output for 5.3.18
case sensitive: 1.7 ms case insensitive: 2.18 ms case substring: 1.49 ms case sensitive gain: 28.28 %
Output for 5.3.17
case sensitive: 1.64 ms case insensitive: 2.18 ms case substring: 1.47 ms case sensitive gain: 32.43 %
Output for 5.3.16
case sensitive: 1.67 ms case insensitive: 2.18 ms case substring: 1.52 ms case sensitive gain: 30.01 %
Output for 5.3.15
case sensitive: 1.71 ms case insensitive: 2.16 ms case substring: 1.54 ms case sensitive gain: 26.09 %
Output for 5.3.14
case sensitive: 1.71 ms case insensitive: 2.29 ms case substring: 1.53 ms case sensitive gain: 34.07 %
Output for 5.3.13
case sensitive: 1.69 ms case insensitive: 2.16 ms case substring: 1.74 ms case sensitive gain: 27.46 %
Output for 5.3.12
case sensitive: 1.71 ms case insensitive: 2.15 ms case substring: 1.52 ms case sensitive gain: 25.56 %
Output for 5.3.11
case sensitive: 2.62 ms case insensitive: 3.42 ms case substring: 2.61 ms case sensitive gain: 30.88 %
Output for 5.3.10
case sensitive: 1.69 ms case insensitive: 2.21 ms case substring: 1.52 ms case sensitive gain: 30.36 %
Output for 5.3.9
case sensitive: 1.65 ms case insensitive: 2.16 ms case substring: 1.49 ms case sensitive gain: 31.33 %
Output for 5.3.8
case sensitive: 1.65 ms case insensitive: 2.87 ms case substring: 1.5 ms case sensitive gain: 73.36 %
Output for 5.3.7
case sensitive: 1.64 ms case insensitive: 2.14 ms case substring: 1.47 ms case sensitive gain: 30.58 %
Output for 5.3.6
case sensitive: 1.69 ms case insensitive: 2.21 ms case substring: 1.54 ms case sensitive gain: 30.73 %
Output for 5.3.5
case sensitive: 1.71 ms case insensitive: 2.16 ms case substring: 1.52 ms case sensitive gain: 26.3 %
Output for 5.3.4
case sensitive: 1.7 ms case insensitive: 2.17 ms case substring: 1.53 ms case sensitive gain: 27.55 %
Output for 5.3.3
case sensitive: 2.99 ms case insensitive: 3.24 ms case substring: 1.98 ms case sensitive gain: 8.38 %
Output for 5.3.2
case sensitive: 1.69 ms case insensitive: 2.16 ms case substring: 1.52 ms case sensitive gain: 27.65 %
Output for 5.3.1
case sensitive: 1.68 ms case insensitive: 2.27 ms case substring: 1.52 ms case sensitive gain: 34.99 %
Output for 5.3.0
case sensitive: 1.71 ms case insensitive: 2.16 ms case substring: 1.54 ms case sensitive gain: 26.48 %
Output for 5.2.17
case sensitive: 1.64 ms case insensitive: 2.33 ms case substring: 1.46 ms case sensitive gain: 42.08 %
Output for 5.2.16
case sensitive: 1.7 ms case insensitive: 2.32 ms case substring: 1.51 ms case sensitive gain: 36.61 %
Output for 5.2.15
case sensitive: 1.69 ms case insensitive: 2.3 ms case substring: 1.51 ms case sensitive gain: 35.88 %
Output for 5.2.14
case sensitive: 1.66 ms case insensitive: 2.27 ms case substring: 1.52 ms case sensitive gain: 36.55 %
Output for 5.2.13
case sensitive: 1.64 ms case insensitive: 2.3 ms case substring: 1.48 ms case sensitive gain: 40.67 %
Output for 5.2.12
case sensitive: 1.66 ms case insensitive: 2.32 ms case substring: 1.51 ms case sensitive gain: 39.42 %
Output for 5.2.11
case sensitive: 1.66 ms case insensitive: 2.32 ms case substring: 1.51 ms case sensitive gain: 39.44 %
Output for 5.2.10
case sensitive: 1.64 ms case insensitive: 2.57 ms case substring: 1.55 ms case sensitive gain: 56.7 %
Output for 5.2.9
case sensitive: 1.66 ms case insensitive: 2.28 ms case substring: 1.51 ms case sensitive gain: 37.48 %
Output for 5.2.8
case sensitive: 1.66 ms case insensitive: 2.33 ms case substring: 1.51 ms case sensitive gain: 40.71 %
Output for 5.2.7
case sensitive: 1.64 ms case insensitive: 2.32 ms case substring: 1.49 ms case sensitive gain: 41.69 %
Output for 5.2.6
case sensitive: 1.53 ms case insensitive: 2.11 ms case substring: 1.43 ms case sensitive gain: 38 %
Output for 5.2.5
case sensitive: 1.67 ms case insensitive: 2.31 ms case substring: 1.83 ms case sensitive gain: 38.49 %
Output for 5.2.4
case sensitive: 1.64 ms case insensitive: 2.3 ms case substring: 1.53 ms case sensitive gain: 40.09 %
Output for 5.2.3
case sensitive: 1.63 ms case insensitive: 2.33 ms case substring: 1.5 ms case sensitive gain: 42.5 %
Output for 5.2.2
case sensitive: 2.59 ms case insensitive: 3.3 ms case substring: 1.89 ms case sensitive gain: 27.33 %
Output for 5.2.1
case sensitive: 1.59 ms case insensitive: 2.33 ms case substring: 1.43 ms case sensitive gain: 46.29 %
Output for 5.2.0
case sensitive: 2.55 ms case insensitive: 2.39 ms case substring: 1.78 ms case sensitive gain: -6.35 %
Output for 5.1.6
case sensitive: 1.61 ms case insensitive: 2.11 ms case substring: 1.38 ms case sensitive gain: 31.09 %
Output for 5.1.5
case sensitive: 1.52 ms case insensitive: 2.15 ms case substring: 1.4 ms case sensitive gain: 41.55 %
Output for 5.1.4
case sensitive: 1.53 ms case insensitive: 2.2 ms case substring: 1.4 ms case sensitive gain: 43.99 %
Output for 5.1.3
case sensitive: 1.55 ms case insensitive: 2.2 ms case substring: 1.39 ms case sensitive gain: 42.02 %
Output for 5.1.2
case sensitive: 1.47 ms case insensitive: 2.13 ms case substring: 1.38 ms case sensitive gain: 44.62 %
Output for 5.1.1
case sensitive: 1.54 ms case insensitive: 2.15 ms case substring: 1.41 ms case sensitive gain: 39.3 %
Output for 5.1.0
case sensitive: 1.51 ms case insensitive: 2.11 ms case substring: 1.37 ms case sensitive gain: 39.29 %
Output for 5.0.5
case sensitive: 3.12 ms case insensitive: 3.82 ms case substring: 2.89 ms case sensitive gain: 22.65 %
Output for 5.0.4
case sensitive: 3.12 ms case insensitive: 3.83 ms case substring: 2.87 ms case sensitive gain: 22.77 %
Output for 5.0.3
case sensitive: 2.73 ms case insensitive: 3.47 ms case substring: 2.62 ms case sensitive gain: 27.37 %
Output for 5.0.2
case sensitive: 2.66 ms case insensitive: 3.46 ms case substring: 2.54 ms case sensitive gain: 29.88 %
Output for 5.0.1
case sensitive: 3.11 ms case insensitive: 3.84 ms case substring: 2.83 ms case sensitive gain: 23.4 %
Output for 5.0.0
case sensitive: 2.75 ms case insensitive: 3.49 ms case substring: 2.59 ms case sensitive gain: 26.58 %
Output for 4.3.0 - 4.4.9
Skipped