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.0140.00016.63
8.3.50.0110.00722.13
8.3.40.0110.00818.95
8.3.30.0120.00619.05
8.3.20.0070.00020.17
8.3.10.0000.00823.47
8.3.00.0080.00019.50
8.2.180.0070.00716.88
8.2.170.0140.00022.96
8.2.160.0070.00720.14
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0030.00522.04
8.2.110.0030.00622.25
8.2.100.0080.00418.03
8.2.90.0050.00319.20
8.2.80.0080.00017.97
8.2.70.0000.01117.75
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00420.07
8.2.30.0040.00419.96
8.2.20.0000.00717.95
8.2.10.0070.00018.13
8.2.00.0090.00317.95
8.1.280.0060.00925.92
8.1.270.0030.00523.91
8.1.260.0080.00026.35
8.1.250.0070.00728.09
8.1.240.0030.00624.02
8.1.230.0030.00719.16
8.1.220.0050.00317.78
8.1.210.0060.00318.77
8.1.200.0000.01017.47
8.1.190.0000.01117.53
8.1.180.0070.00418.10
8.1.170.0080.00018.67
8.1.160.0040.00422.00
8.1.150.0050.00218.82
8.1.140.0000.00817.64
8.1.130.0040.00417.87
8.1.120.0040.00417.52
8.1.110.0000.00817.47
8.1.100.0000.01017.70
8.1.90.0070.00017.66
8.1.80.0030.00617.50
8.1.70.0070.00017.57
8.1.60.0040.00417.66
8.1.50.0030.00617.54
8.1.40.0000.00817.62
8.1.30.0080.00017.77
8.1.20.0030.00517.84
8.1.10.0050.00217.66
8.1.00.0000.00817.48
8.0.300.0040.00420.55
8.0.290.0000.00717.04
8.0.280.0030.00318.46
8.0.270.0040.00417.28
8.0.260.0030.00317.30
8.0.250.0070.00017.16
8.0.240.0000.00717.03
8.0.230.0050.00316.99
8.0.220.0040.00417.11
8.0.210.0030.00317.02
8.0.200.0000.00716.99
8.0.190.0000.00817.14
8.0.180.0050.00317.04
8.0.170.0030.00517.07
8.0.160.0070.00017.09
8.0.150.0040.00417.10
8.0.140.0050.00517.02
8.0.130.0060.00013.43
8.0.120.0040.00416.96
8.0.110.0040.00417.12
8.0.100.0040.00416.99
8.0.90.0020.00516.98
8.0.80.0070.01417.08
8.0.70.0070.00017.14
8.0.60.0040.00417.06
8.0.50.0070.00017.08
8.0.30.0110.01417.21
8.0.20.0090.00917.40
8.0.10.0000.00717.11
8.0.00.0090.00917.03
7.4.330.0000.00615.16
7.4.320.0000.00716.90
7.4.300.0060.00016.75
7.4.290.0040.00416.79
7.4.280.0070.00416.66
7.4.270.0000.00716.76
7.4.260.0080.00016.81
7.4.250.0000.00816.88
7.4.240.0020.00616.86
7.4.230.0020.00516.90
7.4.220.0030.01616.90
7.4.210.0090.00716.85
7.4.200.0030.00316.87
7.4.190.0000.00716.97
7.4.160.0030.01216.71
7.4.150.0140.00417.40
7.4.140.0110.00617.86
7.4.130.0110.01016.82
7.4.120.0080.01016.77
7.4.110.0100.00616.71
7.4.100.0150.00616.64
7.4.90.0090.00916.71
7.4.80.0060.01019.39
7.4.70.0100.00616.97
7.4.60.0130.00316.52
7.4.50.0000.00816.75
7.4.40.0120.00322.77
7.4.30.0080.00816.44
7.4.00.0050.01315.26
7.3.330.0030.00313.34
7.3.320.0030.00313.20
7.3.310.0000.00716.46
7.3.300.0040.00416.41
7.3.290.0000.02116.45
7.3.280.0100.00916.43
7.3.270.0140.00517.40
7.3.260.0190.00016.47
7.3.250.0110.01016.44
7.3.240.0090.00916.75
7.3.230.0130.00616.45
7.3.210.0030.01416.94
7.3.200.0160.00619.39
7.3.190.0040.01816.77
7.3.180.0090.00616.44
7.3.170.0060.00916.63
7.3.160.0080.01116.50
7.3.120.0060.00815.25
7.3.110.0040.00815.21
7.3.100.0000.01614.94
7.3.90.0090.00915.26
7.3.80.0030.01315.04
7.3.70.0100.00314.88
7.3.60.0070.00715.07
7.3.50.0030.00614.88
7.3.40.0030.01014.80
7.3.30.0070.00714.70
7.3.20.0060.01016.86
7.3.10.0100.00316.91
7.3.00.0070.00716.77
7.2.330.0140.00716.79
7.2.320.0000.01616.79
7.2.310.0110.00616.83
7.2.300.0100.00716.67
7.2.290.0070.01116.58
7.2.250.0110.00715.27
7.2.240.0030.01715.22
7.2.230.0120.00615.23
7.2.220.0060.00315.42
7.2.210.0000.01415.26
7.2.200.0000.01415.34
7.2.190.0040.01415.20
7.2.180.0070.01115.30
7.2.170.0000.01515.25
7.2.00.0100.00819.68
7.1.330.0100.00316.17
7.1.320.0090.00616.22
7.1.310.0000.01516.03
7.1.300.0040.01216.14
7.1.290.0080.00616.08
7.1.280.0050.00515.83
7.1.270.0030.01215.78
7.1.260.0080.00515.88
7.1.100.0170.00018.24
7.1.70.0000.00917.54
7.1.60.0090.00919.46
7.1.50.0070.01617.19
7.1.00.0030.07722.35
7.0.200.0030.00516.71
7.0.140.0000.09021.95
7.0.60.0100.07019.97
7.0.50.0100.08017.90
7.0.40.0070.04320.21
7.0.30.0530.06020.18
7.0.20.0230.08720.18
7.0.10.0100.08720.16
7.0.00.0000.05320.00
5.6.280.0000.07721.13
5.6.210.0170.06720.54
5.6.200.0130.05018.22
5.6.190.0100.03720.41
5.6.180.0200.05020.67
5.6.170.0230.08020.49
5.6.160.0200.07020.50
5.6.150.0070.04018.13
5.6.140.0030.04718.24
5.6.130.0070.04318.16
5.6.120.0070.05720.89
5.6.110.0030.04321.04
5.6.100.0070.07721.10
5.6.90.0100.03321.01
5.6.80.0030.08320.39
5.6.70.4730.03020.50
5.5.350.0130.06720.52
5.5.340.0070.08318.04
5.5.330.0130.03720.57
5.5.320.0170.08020.29
5.5.310.0370.04320.29
5.5.300.0030.08317.98
5.5.290.0170.05718.01
5.5.280.0200.06020.78
5.5.270.0070.05020.79
5.5.260.0100.08320.73
5.5.250.0070.06720.49
5.5.240.0100.03320.15
5.4.450.0870.05019.48
5.4.440.0630.07019.46
5.4.430.0500.06319.56
5.4.420.0430.06719.25
5.4.410.0670.05019.35
5.4.400.0600.06019.13
5.4.390.0130.05018.95
5.4.380.0270.06318.52
5.4.370.0330.05318.72
5.4.360.0470.05018.53
5.4.350.0270.05318.68
5.4.340.0270.08018.79
5.4.320.0090.03412.46
5.4.310.0080.04712.45
5.4.300.0040.04312.46
5.4.290.0070.04212.44
5.4.280.0070.04012.34
5.4.270.0070.04212.34
5.4.260.0070.04912.34
5.4.250.0070.03912.34
5.4.240.0040.04112.34
5.4.230.0040.04512.33
5.4.220.0060.04112.33
5.4.210.0080.04012.34
5.4.200.0080.03812.34
5.4.190.0100.03712.33
5.4.180.0100.03412.33
5.4.170.0070.04212.34
5.4.160.0050.04212.34
5.4.150.0110.03512.33
5.4.140.0080.03912.02
5.4.130.0080.03612.01
5.4.120.0110.03511.96
5.4.110.0080.03811.96
5.4.100.0110.03511.96
5.4.90.0070.04011.96
5.4.80.0040.04211.96
5.4.70.0080.03811.96
5.4.60.0100.03611.96
5.4.50.0090.03711.96
5.4.40.0140.03211.94
5.4.30.0090.03711.95
5.4.20.0120.05711.94
5.4.10.0070.03911.94
5.4.00.0060.04111.43
5.3.290.0020.04512.80
5.3.280.0070.04612.71
5.3.270.0110.04912.72
5.3.260.0140.05012.71
5.3.250.0110.05012.72
5.3.240.0110.06412.72
5.3.230.0080.05012.70
5.3.220.0090.04412.68
5.3.210.0030.04612.68
5.3.200.0100.03812.68
5.3.190.0080.04112.68
5.3.180.0100.03812.67
5.3.170.0130.03512.67
5.3.160.0100.03712.68
5.3.150.0060.04012.68
5.3.140.0090.03812.66
5.3.130.0080.04212.66
5.3.120.0090.05412.66
5.3.110.0060.05612.66
5.3.100.0050.05312.11
5.3.90.0050.05612.08
5.3.80.0090.04912.08
5.3.70.0090.05012.07
5.3.60.0110.04812.06
5.3.50.0090.04712.00
5.3.40.0070.05212.00
5.3.30.0100.05011.96
5.3.20.0090.05011.74
5.3.10.0100.05011.70
5.3.00.0080.05611.69
5.2.170.0070.0459.19
5.2.160.0090.0429.19
5.2.150.0090.0419.19
5.2.140.0090.0439.19
5.2.130.0100.0419.15
5.2.120.0060.0449.15
5.2.110.0070.0399.15
5.2.100.0070.0419.15
5.2.90.0080.0409.15
5.2.80.0070.0429.14
5.2.70.0050.0469.14
5.2.60.0100.0409.10
5.2.50.0070.0449.07
5.2.40.0050.0429.05
5.2.30.0090.0409.03
5.2.20.0080.0379.01
5.2.10.0100.0368.92
5.2.00.0050.0428.78
5.1.60.0060.0358.07
5.1.50.0070.0348.06
5.1.40.0060.0368.04
5.1.30.0080.0378.39
5.1.20.0060.0398.41
5.1.10.0080.0348.14
5.1.00.0100.0348.14
5.0.50.0060.0286.61
5.0.40.0020.0316.47
5.0.30.0070.0416.29
5.0.20.0060.0246.26
5.0.10.0070.0256.24
5.0.00.0040.0406.23
4.4.90.0060.0204.78
4.4.80.0030.0244.75
4.4.70.0040.0224.76
4.4.60.0060.0194.76
4.4.50.0010.0254.77
4.4.40.0020.0364.71
4.4.30.0010.0244.76
4.4.20.0030.0244.84
4.4.10.0030.0244.85
4.4.00.0050.0334.76
4.3.110.0020.0244.67
4.3.100.0050.0214.66
4.3.90.0060.0204.63
4.3.80.0060.0314.58
4.3.70.0050.0204.63
4.3.60.0040.0214.62
4.3.50.0050.0214.62
4.3.40.0050.0334.54
4.3.30.0020.0233.29
4.3.20.0030.0223.27
4.3.10.0040.0203.23
4.3.00.0100.01013.17

preferences:
41.41 ms | 401 KiB | 5 Q