3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startWord = ':begin'; $endWord = 'sqlexception'; // Open the SQL file for reading $foundStart = false; $x = 0; $d = array('a', 'b', 'c', ':begin', 'd', 'e', ':begin', 'more', 'sqlexception'); foreach($d as $line) { if ($foundStart || stripos($line, $startWord) !== false) { $foundStart = true; echo $line; // Display the current line if (stripos($line, $endWord) !== false) { $foundStart = false; // Stop displaying lines after finding the end word } } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.10.0130.00416.50
8.5.00.0120.00919.82
8.4.160.0110.00923.84
8.4.150.0050.00716.84
8.4.140.0150.00617.52
8.4.130.0110.00717.77
8.4.120.0100.00623.89
8.4.110.0070.00218.63
8.4.100.0150.00418.59
8.4.90.0050.00420.72
8.4.80.0080.00218.73
8.4.70.0120.00318.78
8.4.60.0110.00818.78
8.4.50.0070.00718.47
8.4.40.0110.01117.40
8.4.30.0040.01520.13
8.4.20.0080.00019.61
8.4.10.0090.00019.43
8.3.280.0020.00114.05
8.3.270.0110.00916.73
8.3.260.0110.00816.64
8.3.250.0050.00916.31
8.3.240.0080.01117.26
8.3.230.0110.00816.55
8.3.220.0110.00718.78
8.3.210.0140.00518.32
8.3.200.0050.00416.73
8.3.190.0140.00517.11
8.3.180.0090.00918.86
8.3.170.0110.00720.56
8.3.160.0030.00517.38
8.3.150.0120.00817.19
8.3.140.0150.00316.84
8.3.130.0050.00318.30
8.3.120.0000.00918.93
8.3.110.0070.00420.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0030.00617.97
8.3.70.0140.00716.38
8.3.60.0180.00016.50
8.3.50.0110.00716.79
8.3.40.0160.00320.33
8.3.30.0090.00619.38
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0130.00520.33
8.2.280.0090.00218.08
8.2.270.0040.00717.27
8.2.260.0090.00916.63
8.2.250.0040.00418.38
8.2.240.0040.00417.14
8.2.230.0050.00322.58
8.2.220.0060.00337.54
8.2.210.0000.00826.77
8.2.200.0030.00718.16
8.2.190.0080.00818.04
8.2.180.0150.00018.41
8.2.170.0130.00318.70
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0180.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00418.90
8.2.110.0130.00922.13
8.2.100.0070.01120.80
8.2.90.0150.00620.51
8.2.80.0160.00618.77
8.2.70.0170.00318.77
8.2.60.0100.00718.60
8.2.50.0150.00318.68
8.2.40.0120.00418.65
8.2.30.0070.01418.66
8.2.20.0030.00718.75
8.2.10.0040.00419.03
8.2.00.0060.00619.11
8.1.330.0110.00822.04
8.1.320.0060.00416.14
8.1.310.0140.00318.55
8.1.300.0120.00319.52
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0140.00418.43
8.1.230.0030.00618.57
8.1.220.0030.00618.53
8.1.210.0090.00019.91
8.1.200.0030.01018.28
8.1.190.0100.00018.48
8.1.180.0050.00518.43
8.1.170.0000.00918.67
8.1.160.0090.01518.72
8.1.150.0030.00718.50
8.1.140.0120.00918.48
8.1.130.0030.00718.61
8.1.120.0000.01018.72
8.1.110.0090.00018.52
8.1.100.0070.01118.49
8.1.90.0100.00018.55
8.1.80.0110.00718.49
8.1.70.0150.00618.80
8.1.60.0110.01118.75
8.1.50.0100.01318.55
8.1.40.0160.00620.52
8.1.30.0100.00018.99
8.1.20.0070.01318.68
8.1.10.0130.00318.66
8.1.00.0110.00718.69
8.0.300.0100.01017.82
8.0.290.0040.00417.78
8.0.280.0090.00017.95
8.0.270.0120.00417.88
8.0.260.0090.00317.95
8.0.250.0030.00618.03
8.0.240.0050.00517.84
8.0.230.0030.00618.26
8.0.220.0030.00617.77
8.0.210.0140.00417.90
8.0.200.0150.00417.80
8.0.190.0030.00717.93
8.0.180.0130.00317.96
8.0.170.0170.00318.01
8.0.160.0060.00317.84
8.0.150.0060.00317.84
8.0.140.0040.00817.74
8.0.130.0170.00017.77
8.0.120.0140.00717.75
8.0.110.0130.00718.01
8.0.100.0190.00017.77
8.0.90.0100.01017.71
8.0.80.0060.01217.83
8.0.70.0100.01017.75
8.0.60.0060.01017.75
8.0.50.0110.00417.81
8.0.30.0100.01017.93
8.0.20.0180.00017.83
8.0.10.0170.00317.96

preferences:
14.75 ms | 403 KiB | 5 Q