3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $hook; $hook = function ( &$reference ) { echo "ok\n"; }; $wrap = function() { $user = []; $params = [ &$user ]; $f = function () use ( $params ) { global $hook; call_user_func_array( $hook, $params ); }; echo "inner\n"; call_user_func( $f ); // works return $f; }; $f = $wrap(); echo "outer\n"; call_user_func( $f ); // fails

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.4.10.0100.00719.60
8.3.140.0070.00317.34
8.3.130.0100.00018.21
8.3.120.0060.00320.60
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0110.00426.77
8.3.80.0040.00418.31
8.3.70.0090.00916.63
8.3.60.0100.00716.38
8.3.50.0140.00516.41
8.3.40.0120.00618.81
8.3.30.0100.01018.73
8.3.20.0040.00421.64
8.3.10.0000.00721.73
8.3.00.0160.00017.55
8.2.250.0140.00718.53
8.2.240.0050.00317.14
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0030.00526.77
8.2.200.0060.00316.63
8.2.190.0110.00416.63
8.2.180.0140.00025.92
8.2.170.0160.00022.96
8.2.160.0030.01021.20
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.09
8.2.110.0060.00322.25
8.2.100.0080.00317.72
8.2.90.0060.00318.01
8.2.80.0060.00317.97
8.2.70.0080.00018.16
8.2.60.0000.00818.03
8.2.50.0060.00318.10
8.2.40.0080.00020.42
8.2.30.0050.00219.22
8.2.20.0070.00018.07
8.2.10.0040.00418.17
8.2.00.0040.00418.13
8.1.300.0110.00816.05
8.1.290.0040.00730.84
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00017.36
8.1.230.0080.00321.10
8.1.220.0040.00417.79
8.1.210.0080.00018.98
8.1.200.0000.00917.47
8.1.190.0060.00317.23
8.1.180.0060.00318.10
8.1.170.0070.00018.90
8.1.160.0000.00818.80
8.1.150.0050.00320.05
8.1.140.0040.00419.58
8.1.130.0080.00018.79
8.1.120.0040.00417.42
8.1.110.0000.00717.32
8.1.100.0030.00517.36
8.1.90.0040.00417.49
8.1.80.0080.00017.45
8.1.70.0000.00717.45
8.1.60.0000.00817.59
8.1.50.0070.00017.54
8.1.40.0060.00317.50
8.1.30.0000.00717.60
8.1.20.0050.00217.67
8.1.10.0050.00217.60
8.1.00.0040.00417.40
8.0.300.0040.00419.98
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0000.00717.10
8.0.260.0070.00016.92
8.0.250.0050.00316.98
8.0.240.0000.00716.98
8.0.230.0000.00716.96
8.0.220.0000.00716.86
8.0.210.0030.00316.75
8.0.200.0040.00416.95
8.0.190.0000.00916.97
8.0.180.0040.00416.89
8.0.170.0000.00716.92
8.0.160.0030.00316.97
8.0.150.0000.00716.95
8.0.140.0070.00016.85
8.0.130.0030.00313.25
8.0.120.0070.00016.79
8.0.110.0040.00416.91
8.0.100.0000.00716.91
8.0.90.0000.00816.77
8.0.80.0100.01016.77
8.0.70.0020.00516.68
8.0.60.0040.00416.71
8.0.50.0050.00216.82
8.0.30.0130.00517.19
8.0.20.0120.00717.40
8.0.10.0070.00017.04
8.0.00.0030.01316.77
7.4.330.0000.00515.55
7.4.320.0040.00416.52
7.4.300.0000.00616.49
7.4.290.0060.00316.57
7.4.280.0040.00416.50
7.4.270.0030.00316.48
7.4.260.0000.00513.33
7.4.250.0050.00316.56
7.4.240.0050.00216.61
7.4.230.0030.00316.57
7.4.220.0060.01216.60
7.4.210.0120.00316.42
7.4.200.0000.00716.57
7.4.160.0050.01316.46
7.4.150.0030.01417.40
7.4.140.0100.00917.86
7.4.130.0100.01016.58
7.4.120.0070.01316.54
7.4.110.0110.00516.50
7.4.100.0100.01016.30
7.4.90.0060.01216.68
7.4.80.0090.00919.39
7.4.70.0130.00616.45
7.4.60.0090.00916.46
7.4.50.0070.01016.61
7.4.40.0160.00016.50
7.4.30.0130.00316.57
7.4.00.0080.00815.20
7.3.330.0080.00013.26
7.3.320.0030.00313.26
7.3.310.0040.00416.35
7.3.300.0000.00716.20
7.3.290.0090.00616.34
7.3.280.0080.00916.29
7.3.270.0100.00717.40
7.3.260.0110.00816.40
7.3.250.0100.00716.38
7.3.240.0100.00716.41
7.3.230.0090.00916.36
7.3.210.0080.00816.59
7.3.200.0000.02016.35
7.3.190.0140.00316.55
7.3.180.0100.00616.49
7.3.170.0090.01216.50
7.3.160.0050.01116.57
7.3.120.0030.01414.79
7.3.110.0140.00414.62
7.3.100.0060.00614.83
7.3.90.0030.01414.79
7.3.80.0110.00714.73
7.3.70.0070.00314.82
7.3.60.0120.00614.90
7.3.50.0090.00914.71
7.3.40.0060.00614.71
7.3.30.0070.00714.88
7.3.20.0080.00416.46
7.3.10.0080.00316.59
7.3.00.0030.01116.63
7.2.330.0170.00016.71
7.2.320.0030.01516.83
7.2.310.0170.00016.74
7.2.300.0100.00716.74
7.2.290.0130.01016.76
7.2.250.0070.01115.28
7.2.240.0030.01714.72
7.2.230.0030.00815.20
7.2.220.0120.00614.66
7.2.210.0130.00315.12
7.2.200.0070.00714.97
7.2.190.0060.00915.17
7.2.180.0000.01814.96
7.2.170.0000.01115.03
7.2.130.0050.00516.88
7.2.120.0060.00616.96
7.2.110.0000.01516.46
7.2.100.0040.01116.49
7.2.90.0090.00616.88
7.2.80.0030.00616.95
7.2.70.0100.00717.02
7.2.60.0050.00816.79
7.2.50.0000.01416.86
7.2.40.0000.01417.13
7.2.30.0050.00516.99
7.2.20.0080.00316.73
7.2.10.0030.01016.93
7.2.00.0040.00416.63
7.1.330.0030.01015.55
7.1.320.0000.01015.48
7.1.310.0030.01415.52
7.1.300.0100.00315.51
7.1.290.0090.00915.87
7.1.280.0090.00015.78
7.1.270.0060.00615.82
7.1.260.0070.00715.82
7.1.250.0090.00615.50
7.1.200.0080.00415.59
7.1.70.0000.00816.86
7.1.60.0930.02033.19
7.1.50.0500.02032.70
7.1.40.0630.02332.45
7.1.30.0670.01332.38
7.1.20.0670.01332.58
7.1.10.0530.01014.67
7.1.00.0600.01314.85
7.0.200.0430.01014.87
7.0.190.0430.01014.80
7.0.180.0530.01014.36
7.0.170.0430.01314.38
7.0.160.0530.00714.33
7.0.150.0600.00714.32
7.0.140.0570.01014.51
7.0.130.0700.00714.69
7.0.120.0500.01314.65
7.0.110.0330.01314.43
7.0.100.0530.00714.67
7.0.90.0370.01014.52
7.0.80.0600.01014.30
7.0.70.0400.00714.52
7.0.60.0500.02014.36
7.0.50.0400.01014.41
7.0.40.0400.02014.67
7.0.30.0400.01714.75
7.0.20.0430.01714.73
7.0.10.0900.01014.57
7.0.00.0470.01014.63
5.6.300.0170.05721.01
5.6.290.0270.06720.68
5.6.280.0170.07720.78
5.6.270.0100.06020.77
5.6.260.0030.06720.92
5.6.250.0100.06020.96
5.6.240.0070.06320.87
5.6.230.0100.09020.89
5.6.220.0030.07020.81
5.6.210.0130.06320.96
5.6.200.0070.07720.71
5.6.190.0100.06320.83
5.6.180.0170.06720.70
5.6.170.0100.06020.79
5.6.160.0100.07020.99
5.6.150.0100.07720.76
5.6.140.0070.06720.98
5.6.130.0070.06020.71
5.6.120.0170.05720.73
5.6.110.0130.06320.71
5.6.100.0100.06320.91
5.6.90.0170.05020.89
5.6.80.0100.05320.11
5.6.70.0100.06020.25
5.6.60.0170.06320.26
5.6.50.0200.04720.18
5.6.40.0130.06020.29
5.6.30.0130.07320.08
5.6.20.0030.07020.30
5.6.10.0100.05320.08
5.6.00.0100.05720.06
5.5.380.0130.06017.50
5.5.370.0070.06317.52
5.5.360.0170.08017.36
5.5.350.0200.05717.46
5.5.340.0100.06718.03
5.5.330.0130.05717.71
5.5.320.0130.06318.04
5.5.310.0100.07018.02
5.5.300.0070.07718.06
5.5.290.0100.06018.04
5.5.280.0170.06718.12
5.5.270.0100.06317.70
5.5.260.0130.06317.78
5.5.250.0130.05717.83
5.5.240.0070.06317.42
5.5.230.0100.05717.51
5.5.220.0030.08017.14
5.5.210.0070.05717.37
5.5.200.0100.06717.47
5.5.190.0070.07717.07
5.5.180.0170.04717.35
5.5.160.0100.05317.38
5.5.150.0100.05317.37
5.5.140.0070.05717.29
5.5.130.0170.04717.41
5.5.120.0030.06017.47
5.5.110.0070.05717.40
5.5.100.0130.05317.02
5.5.90.0230.05017.37
5.5.80.0130.07017.36
5.5.70.0070.06017.35
5.5.60.0100.05017.37
5.5.50.0070.05716.99
5.5.40.0100.07016.98
5.5.30.0200.06317.27
5.5.20.0130.06317.27
5.5.10.0030.08016.94
5.5.00.0030.06717.36
5.4.450.0200.06019.41
5.4.440.0070.06319.25
5.4.430.0100.06719.25
5.4.420.0130.05319.32
5.4.410.0200.04719.43
5.4.400.0170.04718.93
5.4.390.0130.06018.86
5.4.380.0170.06318.87
5.4.370.0100.07319.17
5.4.360.0130.05019.01
5.4.350.0130.04719.24
5.4.340.0070.06018.84
5.4.320.0070.08319.03
5.4.310.0070.06019.05
5.4.300.0130.05319.23
5.4.290.0100.05718.96
5.4.280.0100.05719.00
5.4.270.0030.06018.92
5.4.260.0170.05719.02
5.4.250.0100.07019.02
5.4.240.0170.05018.85
5.4.230.0170.05019.10
5.4.220.0130.05318.95
5.4.210.0070.05718.98
5.4.200.0130.07019.01
5.4.190.0170.05719.00
5.4.180.0070.07719.22
5.4.170.0130.06018.83
5.4.160.0130.05018.89
5.4.150.0030.06318.96
5.4.140.0100.05716.58
5.4.130.0100.05716.62
5.4.120.0100.05016.56
5.4.110.0070.05716.45
5.4.100.0100.05016.58
5.4.90.0170.04316.69
5.4.80.0130.04716.71
5.4.70.0030.05316.71
5.4.60.0130.04716.69
5.4.50.0070.05316.62
5.4.40.0130.05716.67
5.4.30.0130.06016.66
5.4.20.0170.05016.40
5.4.10.0070.05316.62
5.4.00.0200.04716.01
5.3.290.0030.06314.79
5.3.280.0230.04014.90
5.3.270.0130.05714.83
5.3.260.0100.05314.67
5.3.250.0130.05014.79
5.3.240.0100.06314.91
5.3.230.0100.05714.50
5.3.220.0030.05714.83
5.3.210.0170.06314.85
5.3.200.0130.05014.63
5.3.190.0100.05714.84
5.3.180.0070.05314.56
5.3.170.0170.04314.87
5.3.160.0030.05314.85
5.3.150.0070.05314.79
5.3.140.0270.05714.55
5.3.130.0100.06314.43
5.3.120.0070.05014.70
5.3.110.0170.05014.61
5.3.100.0100.06014.22
5.3.90.0030.07014.29
5.3.80.0100.04714.08
5.3.70.0130.04714.21
5.3.60.0100.04714.29
5.3.50.0070.05313.81
5.3.40.0000.05714.21
5.3.30.0230.03313.96
5.3.20.0170.04014.00
5.3.10.0170.04013.71
5.3.00.0130.05013.82
5.2.170.0070.04311.12
5.2.160.0070.04711.34
5.2.150.0030.04311.28
5.2.140.0070.04011.28
5.2.130.0070.04710.91
5.2.120.0030.04711.16
5.2.110.0070.04311.31
5.2.100.0100.04711.02
5.2.90.0000.05311.32
5.2.80.0070.04311.04
5.2.70.0070.04711.29
5.2.60.0070.04311.10
5.2.50.0230.04011.16
5.2.40.0100.04010.98
5.2.30.0000.05311.19
5.2.20.0130.03310.77
5.2.10.0030.04010.91
5.2.00.0100.03710.71
5.1.60.0030.04310.07
5.1.50.0030.03710.07
5.1.40.0100.03310.20
5.1.30.0030.03710.65
5.1.20.0000.04310.42
5.1.10.0130.02710.18
5.1.00.0070.04310.10
5.0.50.0130.0208.59
5.0.40.0070.0278.46
5.0.30.0170.0408.38
5.0.20.0070.0278.47
5.0.10.0000.0408.16
5.0.00.0100.0378.21
4.4.90.0030.0206.49
4.4.80.0030.0306.49
4.4.70.0030.0236.49
4.4.60.0000.0276.49
4.4.50.0030.0236.49
4.4.40.0070.0376.49
4.4.30.0030.0276.49
4.4.20.0000.0336.49
4.4.10.0000.0236.49
4.4.00.0000.0376.49
4.3.110.0100.0176.49
4.3.100.0070.0206.49
4.3.90.0070.0176.49
4.3.80.0030.0336.49
4.3.70.0000.0236.49
4.3.60.0000.0236.49
4.3.50.0030.0236.49
4.3.40.0030.0336.49
4.3.30.0030.0276.49
4.3.20.0030.0206.49
4.3.10.0030.0236.49
4.3.00.0000.0236.49

preferences:
50 ms | 403 KiB | 5 Q