3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$x) { try { $x = 'trying'; return $x; } finally { $x = 'finally'; } } $bar = 'main'; echo foo($bar) . $bar . PHP_EOL; $bar = foo($bar); echo $bar . $bar . PHP_EOL; function baz() { try { return 'trying'; } finally { return 'finally'; } } echo baz() . PHP_EOL;

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.130.0000.00918.27
8.3.120.0030.00620.71
8.3.110.0070.00320.94
8.3.100.0060.00924.06
8.3.90.0080.00026.77
8.3.80.0060.00318.55
8.3.70.0160.00316.63
8.3.60.0090.01216.50
8.3.50.0040.01118.39
8.3.40.0060.01218.85
8.3.30.0070.00718.55
8.3.20.0000.00719.07
8.3.10.0040.00421.60
8.3.00.0040.00422.52
8.2.250.0050.00317.17
8.2.240.0110.00317.40
8.2.230.0100.01022.58
8.2.220.0110.00737.54
8.2.210.0040.00426.77
8.2.200.0030.00616.36
8.2.190.0090.00616.58
8.2.180.0170.00318.16
8.2.170.0080.00819.00
8.2.160.0110.00422.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0060.00919.23
8.2.110.0030.00720.36
8.2.100.0040.00717.72
8.2.90.0000.00820.64
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0040.00417.63
8.2.50.0080.00017.68
8.2.40.0000.00819.35
8.2.30.0040.00419.44
8.2.20.0050.00218.12
8.2.10.0070.00018.20
8.2.00.0000.00819.23
8.1.300.0040.00417.86
8.1.290.0060.00330.84
8.1.280.0140.00025.92
8.1.270.0080.00023.95
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.66
8.1.230.0080.00422.82
8.1.220.0040.00417.79
8.1.210.0000.00818.96
8.1.200.0050.00517.35
8.1.190.0080.00017.23
8.1.180.0000.00918.10
8.1.170.0040.00417.62
8.1.160.0020.00518.85
8.1.150.0080.00019.04
8.1.140.0030.00517.75
8.1.130.0000.00719.11
8.1.120.0040.00417.54
8.1.110.0000.00717.45
8.1.100.0000.00717.38
8.1.90.0040.00417.37
8.1.80.0070.00017.46
8.1.70.0000.00817.52
8.1.60.0050.00317.59
8.1.50.0030.00517.54
8.1.40.0000.00717.43
8.1.30.0050.00217.59
8.1.20.0080.00017.59
8.1.10.0050.00317.39
8.1.00.0060.00317.52
8.0.300.0000.00719.76
8.0.290.0000.00816.75
8.0.280.0030.00318.42
8.0.270.0030.00316.88
8.0.260.0060.00317.23
8.0.250.0000.00716.96
8.0.240.0070.00016.92
8.0.230.0070.00316.95
8.0.220.0060.00316.86
8.0.210.0000.00816.92
8.0.200.0090.00016.86
8.0.190.0000.00816.95
8.0.180.0040.00416.98
8.0.170.0030.00616.96
8.0.160.0100.00016.79
8.0.150.0000.00716.89
8.0.140.0040.00416.85
8.0.130.0000.00613.28
8.0.120.0050.00316.73
8.0.110.0040.00416.71
8.0.100.0010.00616.88
8.0.90.0020.00616.86
8.0.80.0020.01016.82
8.0.70.0040.00316.94
8.0.60.0040.00416.91
8.0.50.0020.00616.82
8.0.30.0120.00816.91
8.0.20.0080.00617.29
8.0.10.0040.00316.87
8.0.00.0100.00516.77
7.4.330.0050.00015.55
7.4.320.0030.00316.52
7.4.300.0000.00616.41
7.4.290.0030.00316.64
7.4.280.0070.00016.51
7.4.270.0020.00516.56
7.4.260.0000.00816.48
7.4.250.0040.00416.60
7.4.240.0070.00016.57
7.4.230.0030.00316.49
7.4.220.0000.00816.47
7.4.210.0070.00816.63
7.4.200.0020.00516.65
7.4.190.0000.00716.76
7.4.180.0070.00016.54
7.4.160.0080.00616.48
7.4.150.0070.00016.52
7.4.140.0080.00917.59
7.4.130.0060.00616.63
7.4.120.0090.00616.56
7.4.110.0080.00716.49
7.4.100.0120.00516.50
7.4.90.0060.00816.30
7.4.80.0110.00517.35
7.4.70.0060.00916.47
7.4.60.0070.00916.38
7.4.50.0040.01116.38
7.4.40.0040.01016.27
7.4.30.0070.00516.42
7.4.20.0040.00716.36
7.4.10.0080.00716.32
7.4.00.0100.00416.02
7.3.330.0000.00513.31
7.3.320.0060.00013.31
7.3.310.0070.00016.16
7.3.300.0040.00316.36
7.3.290.0020.00516.23
7.3.280.0050.00816.28
7.3.270.0000.00616.35
7.3.260.0130.00316.35
7.3.250.0030.00316.16
7.3.240.0050.01116.45
7.3.230.0100.00616.30
7.3.220.0070.00516.30
7.3.210.0080.00816.25
7.3.200.0110.00316.29
7.3.190.0100.00516.36
7.3.180.0040.00916.38
7.3.170.0100.00816.27
7.3.160.0100.00416.35
7.3.150.0080.00516.10
7.3.140.0070.00516.28
7.3.130.0060.00816.20
7.3.120.0070.00816.30
7.3.110.0040.00916.21
7.3.100.0090.00416.22
7.3.90.0030.01016.41
7.3.80.0080.00616.27
7.3.70.0050.00816.30
7.3.60.0060.00516.36
7.3.50.0100.00515.79
7.3.40.0060.01116.34
7.3.30.0050.00816.34
7.3.20.0070.00716.39
7.3.10.0090.00416.39
7.3.00.0590.00515.89
7.2.340.0050.00916.43
7.2.330.0060.01016.55
7.2.320.0040.01016.42
7.2.310.0060.00916.51
7.2.300.0040.01116.30
7.2.290.0070.00716.55
7.2.280.0080.00416.37
7.2.270.0070.00916.41
7.2.260.0090.00516.45
7.2.250.0080.00716.39
7.2.240.0060.00916.52
7.2.230.0070.00616.57
7.2.220.0050.00816.38
7.2.210.0050.00916.26
7.2.200.0080.00516.56
7.2.190.0070.00616.37
7.2.180.0060.00816.53
7.2.170.0100.00516.45
7.2.160.0120.00316.48
7.2.150.0080.00716.67
7.2.140.0100.00416.67
7.2.130.0450.00816.03
7.2.120.0340.00616.13
7.2.110.0710.00616.09
7.2.100.0550.00516.17
7.2.90.0070.00815.90
7.2.80.0130.00316.08
7.2.70.0250.00416.06
7.2.60.0170.00716.27
7.2.50.0090.00516.35
7.2.40.1060.00616.60
7.2.30.0930.00816.58
7.2.20.0720.00916.54
7.2.10.0980.00716.42
7.2.00.1310.00516.48
7.1.330.0080.01315.43
7.1.320.0110.00715.54
7.1.310.0090.00915.51
7.1.300.0130.00515.57
7.1.290.0110.00815.39
7.1.280.0100.00915.45
7.1.270.0160.00315.45
7.1.260.0120.00615.34
7.1.250.0500.00314.92
7.1.240.0450.00914.80
7.1.230.0240.00615.00
7.1.220.0520.00615.06
7.1.210.0110.00814.94
7.1.200.0110.00715.14
7.1.190.0180.00614.90
7.1.180.0130.00715.00
7.1.170.0700.00714.99
7.1.160.1180.00815.31
7.1.150.1200.00815.28
7.1.140.1240.01015.38
7.1.130.1240.00615.37
7.1.120.1420.00615.24
7.1.110.1220.00615.17
7.1.100.1320.00815.12
7.1.90.0950.00715.22
7.1.80.1140.00615.23
7.1.70.1580.00714.98
7.1.60.1320.01019.42
7.1.50.1710.00719.50
7.1.40.1660.01019.29
7.1.30.1590.00619.39
7.1.20.1550.00519.24
7.1.10.1590.00514.85
7.1.00.1110.00714.92
7.0.330.0400.00714.67
7.0.320.0180.00715.16
7.0.310.0140.00515.17
7.0.300.0150.00415.12
7.0.290.0080.01015.11
7.0.280.0110.00615.17
7.0.270.0140.00515.20
7.0.260.0100.00815.21
7.0.250.0100.00715.14
7.0.240.0150.00215.31
7.0.230.0410.00515.36
7.0.220.0110.00615.26
7.0.210.0100.00615.26
7.0.200.0100.00715.21
7.0.190.0120.00515.22
7.0.180.0150.00215.20
7.0.170.0130.00515.22
7.0.160.0140.00515.22
7.0.150.0130.00515.15
7.0.140.0090.01115.33
7.0.130.0110.00615.22
7.0.120.0070.01015.24
7.0.110.0160.00715.21
7.0.100.0130.00615.28
7.0.90.0130.00515.14
7.0.80.0120.00515.10
7.0.70.0130.00615.32
7.0.60.0120.00515.18
7.0.50.0180.00215.28
7.0.40.0140.00515.15
7.0.30.0130.00415.18
7.0.20.0120.00515.17
7.0.10.0100.00715.21
7.0.00.0120.00515.12
5.6.400.0110.01015.84
5.6.390.0150.01015.76
5.6.380.0110.00615.32
5.6.370.0140.00415.97
5.6.360.0110.00915.89
5.6.350.0150.00415.83
5.6.340.0080.01115.70
5.6.330.0100.01015.96
5.6.320.0120.00516.01
5.6.310.0090.00715.93
5.6.300.0130.00515.79
5.6.290.0110.00615.89
5.6.280.0130.00515.95
5.6.270.0100.00915.88
5.6.260.0120.00715.81
5.6.250.0090.01015.77
5.6.240.0080.01015.82
5.6.230.0130.00515.88
5.6.220.0150.00316.02
5.6.210.0130.00515.77
5.6.200.0110.00815.81
5.6.190.0100.00815.78
5.6.180.0160.00215.93
5.6.170.0110.00615.84
5.6.160.0110.00716.03
5.6.150.0080.00915.83
5.6.140.0100.00715.78
5.6.130.0100.00715.95
5.6.120.0140.00315.87
5.6.110.0060.01115.71
5.6.100.0120.00515.69
5.6.90.0140.00315.79
5.6.80.0070.01015.80
5.6.70.0120.00415.79
5.6.60.0090.00815.72
5.6.50.0080.00915.82
5.6.40.0080.01215.72
5.6.30.0120.00515.65
5.6.20.0120.00515.72
5.6.10.0100.00715.73
5.6.00.0070.01115.91
5.5.380.0110.00415.87
5.5.370.0090.00315.88
5.5.360.0060.00615.70
5.5.350.0110.00315.70
5.5.340.0080.00415.64
5.5.330.0000.00915.69
5.5.320.0060.00615.65
5.5.310.0060.00615.50
5.5.300.0080.00515.68
5.5.290.0130.00015.69
5.5.280.0080.00615.68
5.5.270.0050.00815.58
5.5.260.0120.00015.57
5.5.250.0060.00615.66
5.5.240.0100.00315.86
5.5.230.0120.00015.77
5.5.220.0060.00615.63
5.5.210.0080.00415.66
5.5.200.0060.00615.63
5.5.190.0060.00615.59
5.5.180.0040.00815.61
5.5.170.0000.01315.60
5.5.160.0120.00015.66
5.5.150.0090.00315.68
5.5.140.0080.00515.47
5.5.130.0100.00315.44
5.5.120.0130.00015.45
5.5.110.0100.00315.46
5.5.100.0090.00315.42
5.5.90.0060.00615.58
5.5.80.0100.00215.57
5.5.70.0120.00015.77
5.5.60.0080.00415.81
5.5.50.0040.00715.79
5.5.40.0040.00915.80
5.5.30.0090.00315.75
5.5.20.0060.00615.62
5.5.10.0120.00015.52
5.5.00.0090.00315.50
5.4.450.0080.00012.54
5.4.440.0030.00612.38
5.4.430.0040.00412.31
5.4.420.0080.00012.38
5.4.410.0080.00012.46
5.4.400.0090.00012.40
5.4.390.0020.00512.38
5.4.380.0040.00212.49
5.4.370.0070.00012.21
5.4.360.0090.00012.48
5.4.350.0040.00412.46
5.4.340.0040.00412.23
5.4.330.0000.00912.38
5.4.320.0060.00312.28
5.4.310.0040.00412.24
5.4.300.0000.00612.35
5.4.290.0070.00012.20
5.4.280.0020.00512.28
5.4.270.0070.00012.46
5.4.260.0080.00012.49
5.4.250.0070.00012.37
5.4.240.0000.00812.38
5.4.230.0070.00012.23
5.4.220.0040.00412.23
5.4.210.0050.00211.98
5.4.200.0000.00812.00
5.4.190.0000.00612.13
5.4.180.0020.00512.20
5.4.170.0080.00012.19
5.4.160.0080.00012.10
5.4.150.0080.00012.26
5.4.140.0040.00412.22
5.4.130.0030.00512.46
5.4.120.0000.00712.45
5.4.110.0000.00612.45
5.4.100.0080.00012.44
5.4.90.0050.00412.34
5.4.80.0000.00712.57
5.4.70.0020.00612.56
5.4.60.0040.00412.52
5.4.50.0080.00012.30
5.4.40.0050.00312.18
5.4.30.0040.00412.45
5.4.20.0090.00012.20
5.4.10.0060.00312.47
5.4.00.0040.00412.11
5.3.290.0050.00512.62
5.3.280.0050.00512.70
5.3.270.0050.00512.99
5.3.260.0000.00912.87
5.3.250.0050.00512.89
5.3.240.0050.00512.48
5.3.230.0030.00712.80
5.3.220.0050.00512.54
5.3.210.0030.00612.72
5.3.200.0040.00412.94
5.3.190.0090.00012.65
5.3.180.0000.01012.79
5.3.170.0080.00212.96
5.3.160.0110.00013.10
5.3.150.0100.00012.79
5.3.140.0050.00512.84
5.3.130.0070.00312.83
5.3.120.0100.00012.91
5.3.110.0100.00012.93
5.3.100.0090.00012.62
5.3.90.0030.00612.90
5.3.80.0030.00612.66
5.3.70.0100.00012.59
5.3.60.0050.00512.84
5.3.50.0030.00712.72
5.3.40.0030.00712.64
5.3.30.0090.00312.68
5.3.20.0050.00512.64
5.3.10.0000.01012.36
5.3.00.0100.00012.45
5.2.170.0030.00311.67
5.2.160.0030.00311.87
5.2.150.0000.00511.84
5.2.140.0030.00311.90
5.2.130.0000.00511.59
5.2.120.0000.00511.60
5.2.110.0000.00512.00
5.2.100.0040.00211.69
5.2.90.0000.00511.81
5.2.80.0060.00011.73
5.2.70.0040.00211.73
5.2.60.0040.00211.75
5.2.50.0030.00311.59
5.2.40.0020.00211.57
5.2.30.0000.00511.80
5.2.20.0000.00511.57
5.2.10.0050.00011.45
5.2.00.0050.00011.54
5.1.60.0050.00010.91
5.1.50.0050.00011.05
5.1.40.0000.00510.96
5.1.30.0000.00511.03
5.1.20.0050.00010.88
5.1.10.0000.00510.88
5.1.00.0030.00310.93
5.0.50.0000.0069.94
5.0.40.0050.0009.95
5.0.30.0000.0049.76
5.0.20.0000.0049.92
5.0.10.0000.0049.76
5.0.00.0000.0049.76
4.4.90.0000.0049.76
4.4.80.0030.0009.76
4.4.70.0000.0039.76
4.4.60.0000.0039.76
4.4.50.0030.0009.76
4.4.40.0000.0039.76
4.4.30.0000.0039.76
4.4.20.0000.0039.76
4.4.10.0030.0009.76
4.4.00.0000.0039.76
4.3.110.0000.0039.76
4.3.100.0000.0039.76
4.3.90.0000.0039.76
4.3.80.0030.0009.76
4.3.70.0030.0009.76
4.3.60.0000.0039.76
4.3.50.0030.0009.76
4.3.40.0000.0039.76
4.3.30.0030.0009.76
4.3.20.0020.0009.76
4.3.10.0000.0039.76
4.3.00.0010.0019.76

preferences:
49.07 ms | 403 KiB | 5 Q