3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = [0,0,0,1,1,0,1,1,0,0,1,1,0,0,1]; $needle = [1,1,0]; $regex = sprintf( '/(?<=[\[,]%s,)\d+/', implode(',', $needle) ); var_export( preg_match_all($regex, json_encode($haystack), $m) ? $m[0] : [] );

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.00.0140.00624.57
8.4.150.0020.00014.05
8.4.140.0140.00717.79
8.4.130.0130.00717.89
8.4.120.0130.00720.57
8.4.110.0060.00518.88
8.4.100.0110.01018.09
8.4.90.0120.00818.70
8.4.80.0080.00517.98
8.4.70.0040.00418.09
8.4.60.0130.00718.87
8.4.50.0070.00917.81
8.4.40.0140.00717.99
8.4.30.0040.01220.53
8.4.20.0200.00019.79
8.4.10.0130.00622.21
8.3.280.0110.00920.35
8.3.270.0080.01216.51
8.3.260.0100.00816.84
8.3.250.0130.00618.85
8.3.240.0060.00416.83
8.3.230.0060.00216.76
8.3.220.0110.00817.25
8.3.210.0100.00518.64
8.3.200.0060.00616.73
8.3.190.0080.01118.90
8.3.180.0100.00716.97
8.3.170.0130.00718.96
8.3.160.0060.01216.93
8.3.150.0080.00019.04
8.3.140.0080.00016.54
8.3.130.0050.00318.70
8.3.120.0090.00018.66
8.3.110.0110.00020.94
8.3.100.0100.00016.64
8.3.90.0000.00726.77
8.3.80.0090.00016.75
8.3.70.0110.00716.63
8.3.60.0090.00616.75
8.3.50.0000.01520.32
8.3.40.0040.01120.32
8.3.30.0050.01018.97
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0050.00226.16
8.2.290.0120.00720.59
8.2.280.0060.00418.38
8.2.270.0070.01122.34
8.2.260.0040.00416.92
8.2.250.0000.00817.62
8.2.240.0060.00319.04
8.2.230.0030.00622.58
8.2.220.0120.00324.06
8.2.210.0000.01526.77
8.2.200.0080.00016.75
8.2.190.0090.00916.63
8.2.180.0100.00725.92
8.2.170.0150.00018.83
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00020.75
8.2.110.0100.00019.30
8.2.100.0070.00418.03
8.2.90.0000.00818.16
8.2.80.0030.00518.05
8.2.70.0000.00817.74
8.2.60.0000.00918.04
8.2.50.0000.00818.07
8.2.40.0030.00518.22
8.2.30.0040.00418.02
8.2.20.0040.00420.45
8.2.10.0000.00818.15
8.2.00.0000.00719.43
8.1.330.0120.00622.21
8.1.320.0140.00616.11
8.1.310.0040.00416.80
8.1.300.0060.00318.09
8.1.290.0050.00530.84
8.1.280.0110.00425.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.59
8.1.230.0120.00021.04
8.1.220.0050.00317.79
8.1.210.0000.00818.89
8.1.200.0060.00317.48
8.1.190.0040.00417.36
8.1.180.0080.00018.10
8.1.170.0040.00418.62
8.1.160.0000.00718.86
8.1.150.0100.00018.70
8.1.140.0040.00417.63
8.1.130.0040.00418.85
8.1.120.0000.00917.55
8.1.110.0030.00517.50
8.1.100.0000.00817.51
8.1.90.0050.00217.52
8.1.80.0150.00317.40
8.1.70.0030.01317.58
8.1.60.0140.00517.63
8.1.50.0110.00717.47
8.1.40.0040.00917.49
8.1.30.0080.00017.72
8.1.20.0000.00717.56
8.1.10.0070.00417.73
8.1.00.0080.00917.53
8.0.300.0080.00019.84
8.0.290.0080.00016.75
8.0.280.0000.00718.41
8.0.270.0000.00718.12
8.0.260.0060.00018.39
8.0.250.0000.00817.08
8.0.240.0070.00016.92
8.0.230.0070.00016.96
8.0.220.0130.00316.98
8.0.210.0050.01016.98
8.0.200.0170.00017.02
8.0.190.0070.00716.96
8.0.180.0100.00516.95
8.0.170.0090.00516.95
8.0.160.0150.00016.84
8.0.150.0140.00216.94
8.0.140.0100.00516.81
8.0.130.0080.00816.99
8.0.120.0130.00417.03
8.0.110.0140.00017.03
8.0.100.0050.01016.98
8.0.90.0160.00016.94
8.0.80.0100.00616.93
8.0.70.0120.00216.88
8.0.60.0120.00417.03
8.0.50.0090.00617.02
8.0.30.0130.00216.96
8.0.20.0130.00316.89
8.0.10.0150.00017.09
7.4.330.0000.00515.55
7.4.320.0030.00316.56
7.4.300.0070.01116.68
7.4.290.0130.00416.64
7.4.280.0130.00416.73
7.4.270.0110.00616.63
7.4.260.0070.01116.65
7.4.250.0140.00416.74
7.4.240.0100.00316.75
7.4.230.0000.01516.68
7.4.220.0150.00016.64
7.4.210.0100.00716.67
7.4.200.0090.00616.70
7.4.190.0110.00516.77
7.4.180.0080.00816.81
7.4.160.0140.00216.64
7.4.150.0130.00216.71
7.4.140.0160.00016.68
7.4.130.0120.00416.62
7.4.120.0150.00016.68
7.4.110.0110.00216.57
7.4.100.0080.00816.72
7.4.90.0120.00316.64
7.4.80.0070.00716.59
7.4.70.0030.00916.53
7.4.60.0050.00316.75
7.4.50.0040.00416.59
7.4.40.0070.00016.43
7.4.30.0080.00016.64
7.4.20.0000.00916.44
7.4.10.0080.00316.51
7.4.00.0000.01016.60

preferences:
45.87 ms | 403 KiB | 5 Q