3v4l.org

run code in 300+ PHP versions simultaneously
<?php function grep($pattern) { echo "Looking for $pattern\n"; while (true) { $line = (yield); if (false !== strpos($line, $pattern)) { echo "$line\n"; } } } // Imagine we parsed a file which returned the following lines. $lines = array( "<?php\n", "echo 'toto';", ); $g = grep('php'); foreach ($lines as $line) { $g->send($line); }

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.3.60.0070.00718.68
8.3.50.0090.00721.21
8.3.40.0140.00718.80
8.3.30.0100.00318.96
8.3.20.0070.00020.34
8.3.10.0090.00021.96
8.3.00.0040.00422.39
8.2.180.0040.01516.61
8.2.170.0140.00722.96
8.2.160.0100.00319.08
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0070.01026.16
8.2.120.0060.00319.23
8.2.110.0070.00322.00
8.2.100.0070.00318.09
8.2.90.0020.00519.09
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0050.00218.16
8.2.30.0040.00418.07
8.2.20.0040.00417.79
8.2.10.0050.00517.78
8.2.00.0060.00317.78
8.1.280.0070.01425.92
8.1.270.0050.00322.05
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0000.00923.84
8.1.230.0090.00319.05
8.1.220.0050.00317.77
8.1.210.0060.00318.77
8.1.200.0030.00717.48
8.1.190.0040.00417.53
8.1.180.0000.00718.72
8.1.170.0000.00818.52
8.1.160.0040.00422.19
8.1.150.0000.00718.64
8.1.140.0040.00417.45
8.1.130.0000.00717.75
8.1.120.0030.00317.40
8.1.110.0060.00317.41
8.1.100.0000.00717.36
8.1.90.0000.00717.46
8.1.80.0070.00017.41
8.1.70.0000.00717.43
8.1.60.0000.00917.56
8.1.50.0060.00317.48
8.1.40.0000.00717.57
8.1.30.0050.00317.63
8.1.20.0050.00317.65
8.1.10.0000.00817.39
8.1.00.0000.00717.43
8.0.300.0000.00718.77
8.0.290.0060.00317.04
8.0.280.0070.00018.46
8.0.270.0030.00317.24
8.0.260.0030.00316.93
8.0.250.0000.00717.05
8.0.240.0000.00717.05
8.0.230.0030.00316.89
8.0.220.0070.00016.95
8.0.210.0030.00316.88
8.0.200.0030.00516.96
8.0.190.0000.00816.88
8.0.180.0000.00716.94
8.0.170.0030.00516.96
8.0.160.0040.00416.95
8.0.150.0040.00416.90
8.0.140.0040.00416.79
8.0.130.0000.00613.48
8.0.120.0030.00616.92
8.0.110.0050.00217.00
8.0.100.0020.00516.84
8.0.90.0050.00316.79
8.0.80.0030.01517.02
8.0.70.0040.00416.82
8.0.60.0000.00716.82
8.0.50.0000.00716.78
8.0.30.0130.00517.15
8.0.20.0080.01117.40
8.0.10.0070.00017.02
8.0.00.0090.00916.64
7.4.330.0030.00315.00
7.4.320.0030.00316.59
7.4.300.0000.00716.63
7.4.290.0070.00016.61
7.4.280.0000.00716.41
7.4.270.0030.00316.50
7.4.260.0040.00416.58
7.4.250.0000.00716.48
7.4.240.0000.00716.57
7.4.230.0000.00616.36
7.4.220.0060.01216.50
7.4.210.0080.00916.62
7.4.200.0000.00716.54
7.4.190.0030.00316.64
7.4.160.0060.00916.42
7.4.150.0100.00717.40
7.4.140.0090.01117.86
7.4.130.0080.00816.59
7.4.120.0080.00816.50
7.4.110.0030.01416.70
7.4.100.0000.01716.52
7.4.90.0060.01216.46
7.4.80.0030.01319.39
7.4.70.0120.01216.33
7.4.60.0150.00316.52
7.4.50.0000.00816.23
7.4.40.0100.00722.77
7.4.30.0140.00716.64
7.4.00.0090.00914.98
7.3.330.0030.00313.45
7.3.320.0050.00013.24
7.3.310.0000.00716.47
7.3.300.0000.00616.38
7.3.290.0070.01016.35
7.3.280.0110.00616.38
7.3.270.0060.01317.40
7.3.260.0070.01016.40
7.3.250.0100.00916.40
7.3.240.0100.01016.59
7.3.230.0060.00916.60
7.3.210.0120.00616.38
7.3.200.0070.01019.39
7.3.190.0040.01816.63
7.3.180.0080.01216.39
7.3.170.0120.00916.44
7.3.160.0080.00816.55
7.3.120.0030.01014.66
7.2.330.0110.00816.77
7.2.320.0080.01216.79
7.2.310.0060.01016.72
7.2.300.0000.01716.55
7.2.290.0080.00816.54
7.2.60.0030.01217.00
7.1.200.0000.01115.95
7.1.70.0050.00317.13
7.1.60.0060.01819.82
7.1.50.0110.01117.02
7.1.00.0030.03322.35
7.0.200.0050.00516.52
7.0.140.0100.07022.13
7.0.60.0070.08319.79
7.0.50.0130.08017.85
7.0.40.0170.03320.15
7.0.30.0270.04720.21
7.0.20.0230.06020.24
7.0.10.0300.08320.24
7.0.00.0100.08320.16
5.6.280.0070.07020.90
5.6.210.0000.04720.48
5.6.200.0070.04018.28
5.6.190.0070.07720.33
5.6.180.3300.04020.48
5.6.170.0300.04720.57
5.6.160.0000.09320.50
5.6.150.0070.08018.16
5.6.140.0070.07018.11
5.6.130.0170.07318.19
5.6.120.0000.04321.12
5.6.110.0070.08721.02
5.6.100.0100.04720.96
5.6.90.0100.06720.98
5.6.80.0170.06720.38
5.6.70.0100.04020.35
5.5.350.0170.08020.37
5.5.340.0070.08017.98
5.5.330.0030.07720.42
5.5.320.0130.04720.28
5.5.310.0230.06720.30
5.5.300.0030.04018.08
5.5.290.0030.06017.94
5.5.280.0070.04720.80
5.5.270.0100.08320.82
5.5.260.0170.06320.84
5.5.250.0100.08320.58
5.5.240.0170.04320.03
5.4.450.0530.05719.41
5.4.440.0830.06019.11
5.4.430.0030.06319.64
5.4.420.0100.05719.18
5.4.410.0430.06019.39
5.4.400.0300.06318.75
5.4.390.0330.05718.61
5.4.380.0200.06018.58
5.4.370.0230.05018.73
5.4.360.0070.06018.50
5.4.350.0130.06018.60
5.4.340.0200.05018.57
5.4.320.0200.04718.58
5.4.310.0170.05318.76
5.4.300.0170.05318.75
5.4.290.0200.05318.75
5.4.280.0230.05018.46
5.4.270.0300.05018.58
5.4.260.0230.04718.56
5.4.250.0270.04718.77
5.4.240.0070.06318.55
5.4.230.0170.05318.66
5.4.220.0100.06018.50
5.4.210.0170.05018.72
5.4.200.0230.04316.66
5.4.190.0170.05018.45
5.4.180.0130.05718.75
5.4.170.0170.06318.87
5.4.160.0270.04018.58
5.4.150.0070.05719.00
5.4.140.0100.05716.18
5.4.130.0270.04016.31
5.4.120.0100.05316.25
5.4.110.0170.04716.25
5.4.100.0030.05716.30
5.4.90.0170.05016.21
5.4.80.0100.05316.27
5.4.70.0130.05316.18
5.4.60.0200.04716.38
5.4.50.0170.04716.14
5.4.40.0070.06316.20
5.4.30.0200.04716.21
5.4.20.0400.03016.29
5.4.10.0170.04716.27
5.4.00.0230.04015.61
5.3.290.0130.05714.54
5.3.280.0230.04714.64
5.3.270.0170.05314.41
5.3.260.0130.06014.49
5.3.250.0100.06014.48
5.3.240.0270.04314.43
5.3.230.0200.05014.46
5.3.220.0100.06014.59
5.3.210.0170.05014.54
5.3.200.0130.05314.45
5.3.190.0130.05314.48
5.3.180.0200.05314.50
5.3.170.0200.06714.44
5.3.160.0070.06014.44
5.3.150.0100.05714.36
5.3.140.0130.05314.43
5.3.130.0100.05714.38
5.3.120.0170.05314.37
5.3.110.0100.05314.53
5.3.100.0170.05014.03
5.3.90.0170.05313.89
5.3.80.0100.05313.98
5.3.70.0030.06013.83
5.3.60.0130.05013.91
5.3.50.0100.05713.77
5.3.40.0100.05713.75
5.3.30.0230.04013.89
5.3.20.0130.05013.67
5.3.10.0100.05013.59
5.3.00.0070.05313.43
5.2.170.0070.04311.10
5.2.160.0070.04710.95
5.2.150.0070.04710.94
5.2.140.0130.04011.00
5.2.130.0070.04310.98
5.2.120.0130.04010.91
5.2.110.0130.04010.90
5.2.100.0200.03311.06
5.2.90.0100.04310.96
5.2.80.0100.07010.83
5.2.70.0170.04010.95
5.2.60.0100.04310.82
5.2.50.0100.05010.97
5.2.40.0200.03310.86
5.2.30.0130.04010.80
5.2.20.0130.03710.84
5.2.10.0170.03310.80
5.2.00.0130.03710.57
5.1.60.0100.0339.78
5.1.50.0070.0379.86
5.1.40.0070.0409.82
5.1.30.0070.04010.20
5.1.20.0130.03310.29
5.1.10.0130.03710.08
5.1.00.0100.0379.95
5.0.50.0100.0278.37
5.0.40.0070.0278.22
5.0.30.0170.0438.09
5.0.20.0100.0278.13
5.0.10.0130.0238.08
5.0.00.0070.0478.00
4.4.90.0230.0135.81
4.4.80.0030.0235.80
4.4.70.0100.0205.81
4.4.60.0030.0275.84
4.4.50.0130.0135.83
4.4.40.0130.0305.82
4.4.30.0070.0235.90
4.4.20.0100.0175.92
4.4.10.0030.0236.01
4.4.00.0030.0375.83
4.3.110.0100.0205.81
4.3.100.0070.0205.80
4.3.90.0030.0275.70
4.3.80.0030.0375.75
4.3.70.0100.0205.73
4.3.60.0070.0176.68
4.3.50.0000.0275.75
4.3.40.0030.0405.72
4.3.30.0000.0275.46
4.3.20.0030.0235.46
4.3.10.0030.0275.46
4.3.00.0000.0337.89

preferences:
40.64 ms | 401 KiB | 5 Q