3v4l.org

run code in 300+ PHP versions simultaneously
<?php $js = "function log_me() { console.log('sub2'); } log_me(); function popa() { do_stuff(); } function popa() { do_stuff(); } function popa() { do_stuff(); } function popa() { do_stuff(); }"; $js_pieces = explode('}',$js); foreach($js_pieces as &$js_piece) { if(strpos($js_piece,'function')) { if (preg_match_all('/[\.\{]*function.*[a-zA-Z_]*\(\)/',$js_piece,$temp_js_arr)) { echo $js_piece; } } }

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.01116.88
8.3.50.0100.01122.12
8.3.40.0100.01418.87
8.3.30.0120.00318.80
8.3.20.0000.00720.33
8.3.10.0030.00523.61
8.3.00.0040.00419.50
8.2.180.0040.01118.66
8.2.170.0070.00722.96
8.2.160.0090.00620.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00322.26
8.2.110.0090.00019.19
8.2.100.0060.00617.91
8.2.90.0040.00419.25
8.2.80.0030.00518.04
8.2.70.0060.00317.63
8.2.60.0060.00318.04
8.2.50.0000.00818.07
8.2.40.0080.00020.01
8.2.30.0040.00419.84
8.2.20.0040.00417.91
8.2.10.0000.00718.13
8.2.00.0040.00718.03
8.1.280.0110.00725.92
8.1.270.0040.00423.97
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0070.00721.13
8.1.230.0040.00822.66
8.1.220.0030.00517.78
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0090.00317.43
8.1.180.0030.00718.10
8.1.170.0030.00718.70
8.1.160.0000.00722.08
8.1.150.0070.00018.85
8.1.140.0040.00417.62
8.1.130.0000.00717.91
8.1.120.0040.00417.58
8.1.110.0000.00817.61
8.1.100.0070.00417.51
8.1.90.0040.00417.57
8.1.80.0000.00817.50
8.1.70.0000.00717.48
8.1.60.0030.00617.70
8.1.50.0040.00417.67
8.1.40.0000.00717.62
8.1.30.0040.00417.71
8.1.20.0080.00017.78
8.1.10.0080.00017.54
8.1.00.0040.00417.55
8.0.300.0000.00820.62
8.0.290.0000.00717.05
8.0.280.0040.00418.54
8.0.270.0030.00317.18
8.0.260.0040.00417.28
8.0.250.0070.00017.11
8.0.240.0030.00317.01
8.0.230.0030.00317.07
8.0.220.0070.00017.10
8.0.210.0000.00716.96
8.0.200.0030.00316.93
8.0.190.0000.00817.11
8.0.180.0070.00017.03
8.0.170.0040.00417.10
8.0.160.0030.00316.97
8.0.150.0040.00417.07
8.0.140.0040.00416.89
8.0.130.0000.00513.49
8.0.120.0000.00816.97
8.0.110.0050.00317.09
8.0.100.0080.00016.92
8.0.90.0030.00416.95
8.0.80.0000.01517.07
8.0.70.0040.00416.99
8.0.60.0040.00417.07
8.0.50.0020.00517.00
8.0.30.0150.00517.18
8.0.20.0050.01817.40
8.0.10.0000.00817.26
8.0.00.0080.00917.14
7.4.330.0050.00015.10
7.4.320.0070.00016.85
7.4.300.0060.00016.77
7.4.290.0070.00016.85
7.4.280.0000.00716.79
7.4.270.0070.00016.93
7.4.260.0000.00716.89
7.4.250.0040.00416.73
7.4.240.0030.00516.90
7.4.230.0070.00016.76
7.4.220.0000.01816.77
7.4.210.0080.00616.88
7.4.200.0030.00316.86
7.4.190.0070.00016.71
7.4.160.0120.00416.80
7.4.150.0180.00017.40
7.4.140.0070.01017.86
7.4.130.0090.00916.59
7.4.120.0120.00716.72
7.4.110.0130.00316.77
7.4.100.0080.01616.69
7.4.90.0030.01416.51
7.4.80.0090.00919.39
7.4.70.0130.00316.65
7.4.60.0090.00916.69
7.4.50.0000.00916.67
7.4.40.0090.00622.77
7.4.30.0060.00916.75
7.4.00.0090.00715.09
7.3.330.0000.00513.34
7.3.320.0020.00213.34
7.3.310.0040.00416.26
7.3.300.0000.00816.25
7.3.290.0120.00316.41
7.3.280.0110.00816.39
7.3.270.0100.00717.40
7.3.260.0110.01116.66
7.3.250.0100.01416.50
7.3.240.0110.00616.65
7.3.230.0100.00616.69
7.3.210.0130.01016.76
7.3.200.0070.01419.39
7.3.190.0120.01016.73
7.3.180.0060.00916.43
7.3.170.0100.00616.46
7.3.160.0050.01316.49
7.3.120.0080.00815.02
7.3.110.0030.01414.84
7.3.100.0130.00315.20
7.3.90.0030.01015.16
7.3.80.0080.00814.68
7.3.70.0060.00315.00
7.3.60.0060.00914.93
7.3.50.0100.00714.85
7.3.40.0000.01414.87
7.3.30.0030.00714.91
7.3.20.0000.01416.65
7.3.10.0060.00916.68
7.3.00.0040.00416.85
7.2.330.0000.01716.81
7.2.320.0030.01316.83
7.2.310.0030.01316.93
7.2.300.0100.00716.82
7.2.290.0110.00616.93
7.2.250.0040.01515.33
7.2.240.0030.01714.90
7.2.230.0030.01315.00
7.2.220.0100.00315.16
7.2.210.0110.00615.05
7.2.200.0040.01115.08
7.2.190.0000.01214.97
7.2.180.0070.01015.30
7.2.170.0070.00415.09
7.2.60.0070.00716.88
7.2.00.0090.00919.79
7.1.330.0130.00316.16
7.1.320.0140.00315.91
7.1.310.0030.01416.01
7.1.300.0040.00415.87
7.1.290.0080.00815.96
7.1.280.0060.00915.77
7.1.270.0040.01116.02
7.1.260.0000.01415.98
7.1.200.0190.00815.71
7.1.100.0060.01018.27
7.1.70.0000.01117.43
7.1.60.0090.01519.46
7.1.50.0030.01717.25
7.1.00.0070.07322.30
7.0.200.0040.00417.11
7.0.140.0070.07022.01
7.0.60.0100.06319.89
7.0.50.0070.05717.82
7.0.40.0100.04020.21
7.0.30.0230.04320.19
7.0.20.0270.08020.32
7.0.10.0100.08320.14
7.0.00.0100.08020.34
5.6.280.0000.07720.90
5.6.210.0100.07720.51
5.6.200.0070.07318.20
5.6.190.0030.04320.64
5.6.180.0330.03320.41
5.6.170.0270.03720.33
5.6.160.0100.05020.41
5.6.150.0130.07718.14
5.6.140.0070.07318.08
5.6.130.0000.08718.11
5.6.120.0070.04021.05
5.6.110.0070.06320.98
5.6.100.0030.08721.01
5.6.90.0070.05720.94
5.6.80.0270.08020.38
5.6.70.4130.04020.38
5.5.350.0070.08320.52
5.5.340.0030.04717.98
5.5.330.0070.04720.37
5.5.320.0270.08020.24
5.5.310.0300.06720.26
5.5.300.0070.08717.96
5.5.290.0200.04017.90
5.5.280.0070.04020.84
5.5.270.0100.06320.76
5.5.260.0070.04020.97
5.5.250.0030.09020.71
5.5.240.0200.04320.18
5.4.450.0670.06019.46
5.4.440.0770.06319.54
5.4.430.0600.05719.59
5.4.420.0630.05719.47
5.4.410.0770.05719.14
5.4.400.0330.05719.30
5.4.390.0130.05019.30
5.4.380.0470.05018.46
5.4.370.0270.05718.49
5.4.360.0300.04718.72
5.4.350.0400.05018.46
5.4.340.0270.05318.68
5.4.320.0050.03712.45
5.4.310.0080.03512.45
5.4.300.0070.03712.46
5.4.290.0140.05012.44
5.4.280.0080.05312.34
5.4.270.0100.04912.34
5.4.260.0090.05312.34
5.4.250.0080.05412.34
5.4.240.0070.05412.34
5.4.230.0080.05412.34
5.4.220.0110.05112.34
5.4.210.0130.04812.33
5.4.200.0100.05212.34
5.4.190.0090.05412.33
5.4.180.0200.12012.33
5.4.170.0120.07712.34
5.4.160.0060.05112.34
5.4.150.0080.05912.33
5.4.140.0180.08812.02
5.4.130.0140.07712.01
5.4.120.0120.06011.96
5.4.110.0100.08511.96
5.4.100.0130.08811.96
5.4.90.0140.06311.96
5.4.80.0100.06411.96
5.4.70.0120.05811.95
5.4.60.0060.05311.95
5.4.50.0180.08811.95
5.4.40.0130.08311.94
5.4.30.0160.07211.95
5.4.20.0060.08311.94
5.4.10.0130.05511.94
5.4.00.0060.03911.43
5.3.290.0030.04312.80
5.3.280.0120.06512.71
5.3.270.0110.07312.72
5.3.260.0140.07612.72
5.3.250.0120.06312.72
5.3.240.0260.06712.71
5.3.230.0200.09012.71
5.3.220.0080.06812.68
5.3.210.0160.07412.68
5.3.200.0230.09912.68
5.3.190.0120.09412.68
5.3.180.0240.07112.67
5.3.170.0260.07412.67
5.3.160.0180.07312.68
5.3.150.0100.09112.68
5.3.140.0170.05912.66
5.3.130.0120.05812.66
5.3.120.0090.05112.66
5.3.110.0140.09112.66
5.3.100.0090.05112.12
5.3.90.0060.05712.09
5.3.80.0130.05712.07
5.3.70.0170.07112.07
5.3.60.0090.07312.07
5.3.50.0110.05612.00
5.3.40.0160.07212.00
5.3.30.0130.06811.96
5.3.20.0110.05511.74
5.3.10.0180.09611.70
5.3.00.0140.05811.69
5.2.170.0080.0479.19
5.2.160.0050.0499.19
5.2.150.0100.0669.19
5.2.140.0110.0759.19
5.2.130.0140.0609.15
5.2.120.0090.0609.15
5.2.110.0100.0629.16
5.2.100.0130.0659.15
5.2.90.0100.0529.15
5.2.80.0160.0679.14
5.2.70.0130.0639.14
5.2.60.0080.0649.10
5.2.50.0160.0669.07
5.2.40.0130.0609.05
5.2.30.0060.0379.03
5.2.20.0060.0419.02
5.2.10.0080.0658.92
5.2.00.0080.0298.78
5.1.60.0100.0268.07
5.1.50.0030.0288.06
5.1.40.0050.0338.04
5.1.30.0090.0378.39
5.1.20.0100.0478.41
5.1.10.0060.0418.14
5.1.00.0040.0398.14
5.0.50.0050.0316.62
5.0.40.0080.0296.47
5.0.30.0060.0416.29
5.0.20.0040.0286.26
5.0.10.0050.0196.23
5.0.00.0050.0316.23
4.4.90.0060.0184.78
4.4.80.0040.0204.75
4.4.70.0030.0214.75
4.4.60.0060.0374.75
4.4.50.0120.0294.77
4.4.40.0050.0544.71
4.4.30.0070.0314.76
4.4.20.0080.0434.85
4.4.10.0030.0234.85
4.4.00.0030.0274.76
4.3.110.0040.0184.66
4.3.100.0020.0164.66
4.3.90.0050.0124.63
4.3.80.0070.0244.59
4.3.70.0030.0154.63
4.3.60.0040.0144.63
4.3.50.0050.0154.63
4.3.40.0050.0304.54
4.3.30.0020.0203.29
4.3.20.0060.0233.27
4.3.10.0030.0153.23
4.3.00.0030.02013.17

preferences:
44.78 ms | 401 KiB | 5 Q