3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_callback( &$param ) {} $callback = 'my_callback'; $a = true; $b = array( $a ); $c = array( &$a ); //my_callback( true ); // Fatal error: passing a value when reference is expected. my_callback( $a ); // OK //$callback( true ); // Fatal error: passing a value when reference is expected. $callback( $a ); // OK call_user_func( $callback, true ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func( $callback, $a ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func( $callback, ...$b ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func( $callback, ...$c ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func_array( $callback, array( true ) ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func_array( $callback, array( $a ) ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func_array( $callback, $b ); // Warning: Parameter 1 to my_callback() expected to be a reference, value given call_user_func_array( $callback, array( &$a ) ); // OK call_user_func_array( $callback, $c ); // OK

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.0130.00318.29
8.3.50.0180.00018.02
8.3.40.0100.00718.89
8.3.30.0040.01118.85
8.3.20.0080.00021.66
8.3.10.0080.00019.97
8.3.00.0000.00823.66
8.2.180.0110.00418.54
8.2.170.0120.00322.96
8.2.160.0120.00319.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0020.00526.16
8.2.110.0050.00522.26
8.2.100.0040.00817.84
8.2.90.0040.00417.50
8.2.80.0080.00017.97
8.2.70.0000.00817.98
8.2.60.0070.00318.22
8.2.50.0050.00318.10
8.2.40.0090.00019.51
8.2.30.0000.00719.13
8.2.20.0040.00418.06
8.2.10.0040.00419.31
8.2.00.0070.00019.30
8.1.280.0090.00625.92
8.1.270.0100.00520.64
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0110.00021.87
8.1.230.0100.00322.73
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.38
8.1.190.0090.00017.23
8.1.180.0090.00018.10
8.1.170.0000.00818.66
8.1.160.0000.00718.86
8.1.150.0040.00418.89
8.1.140.0040.00422.14
8.1.130.0000.00820.14
8.1.120.0040.00417.33
8.1.110.0000.00817.38
8.1.100.0030.00517.35
8.1.90.0000.00917.41
8.1.80.0040.00417.50
8.1.70.0030.00317.34
8.1.60.0000.00817.47
8.1.50.0000.00817.52
8.1.40.0090.00017.48
8.1.30.0040.00417.70
8.1.20.0030.00517.61
8.1.10.0000.00817.55
8.1.00.0070.00017.58
8.0.300.0000.00719.73
8.0.290.0000.00916.75
8.0.280.0040.00418.37
8.0.270.0000.00717.24
8.0.260.0000.00619.98
8.0.250.0040.00416.96
8.0.240.0030.00616.91
8.0.230.0040.00417.02
8.0.220.0070.00016.99
8.0.210.0000.00816.85
8.0.200.0040.00417.06
8.0.190.0100.00017.05
8.0.180.0040.00416.87
8.0.170.0120.00016.98
8.0.160.0040.00717.03
8.0.150.0030.00516.90
8.0.140.0040.00416.98
8.0.130.0000.00513.41
8.0.120.0040.00416.90
8.0.110.0000.00716.87
8.0.100.0000.00816.78
8.0.90.0000.00816.74
8.0.80.0030.01316.91
8.0.70.0050.00316.83
8.0.60.0020.00516.90
8.0.50.0040.00416.95
8.0.30.0120.00517.14
8.0.20.0060.01417.11
8.0.10.0050.00217.05
8.0.00.0130.00816.76
7.4.330.0030.00315.55
7.4.320.0030.00316.53
7.4.300.0040.00416.64
7.4.290.0000.00816.45
7.4.280.0000.00716.61
7.4.270.0000.01016.63
7.4.260.0000.00716.63
7.4.250.0040.00416.59
7.4.240.0050.00216.55
7.4.230.0070.00016.66
7.4.220.0020.00516.64
7.4.210.0090.00916.54
7.4.200.0050.00216.61
7.4.140.0120.00617.86
7.4.130.0040.01516.60
7.4.120.0060.01016.57
7.4.110.0100.01016.50
7.4.100.0080.00916.46
7.4.90.0100.00716.64
7.4.80.0180.00319.39
7.4.70.0100.00916.51
7.4.60.0100.01316.58
7.4.50.0060.01016.50
7.4.40.0060.01516.58
7.4.00.0090.00615.07
7.3.330.0000.00713.39
7.3.320.0030.00313.36
7.3.310.0030.00316.31
7.3.300.0060.00016.39
7.3.290.0040.00416.19
7.3.280.0090.00916.34
7.3.260.0110.00716.39
7.3.240.0120.00716.37
7.3.230.0090.01716.50
7.3.210.0100.00716.38
7.3.200.0070.01016.60
7.3.190.0140.00316.48
7.3.180.0070.01016.54
7.3.170.0170.00016.38
7.3.160.0140.00416.45
7.3.70.0110.00414.36
7.3.60.0090.00314.56
7.3.50.0040.01314.37
7.3.40.0030.00914.47
7.3.30.0150.00314.72
7.3.20.0150.00614.51
7.3.10.0160.00514.59
7.3.00.0170.00414.39
7.2.330.0100.00716.64
7.2.320.0060.01616.72
7.2.310.0140.00816.65
7.2.300.0100.01016.62
7.2.290.0100.00616.31
7.2.200.0040.01114.59
7.2.190.0040.01214.85
7.2.180.0090.00614.59
7.2.170.0060.01214.70
7.2.160.0030.01614.63
7.2.150.0260.00014.69
7.2.140.0140.01214.47
7.2.130.0100.01314.89
7.2.120.0150.00614.74
7.2.110.0160.00314.72
7.2.100.0130.01014.82
7.2.90.0070.01714.77
7.2.80.0090.00614.62
7.2.70.0100.01014.36
7.2.60.0100.01014.83
7.2.50.0080.00814.81
7.2.40.0060.01314.64
7.2.30.0050.01214.80
7.2.20.0100.01014.76
7.2.10.0070.01315.00
7.2.00.0340.00314.89
7.1.300.0040.01613.82
7.1.290.0060.01113.57
7.1.280.0130.00713.84
7.1.270.0110.01113.50
7.1.260.0180.00013.93
7.1.250.0130.00713.67
7.1.240.0090.00913.55
7.1.230.0210.00013.49
7.1.220.0090.00913.36
7.1.210.0210.00013.51
7.1.200.0120.00313.73
7.1.190.0160.00313.42
7.1.180.0110.00813.85
7.1.170.0110.00713.46
7.1.160.0060.01313.53
7.1.150.0070.01413.46
7.1.140.0190.00313.49
7.1.130.0090.00913.67
7.1.120.0170.01013.45
7.1.110.0110.00813.80
7.1.100.0140.00713.47
7.1.90.0100.01013.79
7.1.80.0140.00413.62
7.1.70.0110.00613.72
7.1.60.0060.00913.75
7.1.50.0120.00313.81
7.1.40.0090.00613.70
7.1.30.0140.00713.70
7.1.20.0080.01213.79
7.1.10.0080.00813.83
7.1.00.0130.00313.58
7.0.330.0380.00813.28
7.0.320.0150.00413.01
7.0.310.0070.01113.23
7.0.300.0120.00613.06
7.0.290.0180.00412.88
7.0.280.0170.00713.25
7.0.270.0090.00913.16
7.0.260.0100.01013.20
7.0.250.0100.01012.84
7.0.240.0080.01213.10
7.0.230.0100.01013.51
7.0.220.0110.01113.40
7.0.210.0100.00613.28
7.0.200.0090.00613.31
7.0.190.0080.00613.26
7.0.180.0170.00013.30
7.0.170.0070.00713.32
7.0.160.0110.00413.25
7.0.150.0120.00613.00
7.0.140.0170.00313.27
7.0.130.0140.00713.09
7.0.120.0120.00913.13
7.0.110.0140.00713.29
7.0.100.0650.00713.22
7.0.90.0100.00713.27
7.0.80.0150.00613.45
7.0.70.0120.00813.10
7.0.60.0120.00913.33
7.0.50.0090.00613.11
7.0.40.0150.00013.09
7.0.30.0060.00913.68
7.0.20.0070.01013.35
7.0.10.0160.00013.64
7.0.00.0090.00613.45
5.6.400.0130.00413.76
5.6.390.0070.00713.94
5.6.380.0100.00813.92
5.6.370.0160.00614.27
5.6.360.0100.01113.79
5.6.350.0150.00413.91
5.6.340.0090.01214.39
5.6.330.0140.01014.25
5.6.320.0090.01314.27
5.6.310.0110.01114.26
5.6.300.0110.00614.39
5.6.290.0160.00514.34
5.6.280.0040.01814.48
5.6.270.0120.00814.45
5.6.260.0160.00714.32
5.6.250.0140.00214.57
5.6.240.0100.00514.25
5.6.230.0110.00414.14
5.6.220.0100.00714.14
5.6.210.0160.00414.34
5.6.200.0120.00914.32
5.6.190.0050.01414.22
5.6.180.0100.00714.13
5.6.170.0130.00214.54
5.6.160.0120.00614.44
5.6.150.0080.00914.18
5.6.140.0050.01014.13
5.6.130.0120.00414.29
5.6.120.0090.00914.30
5.6.110.0050.01014.21
5.6.100.0180.00314.07
5.6.90.0090.00914.29
5.6.80.0070.00714.26
5.6.70.0070.01014.22
5.6.60.0060.00614.06
5.6.50.0070.00714.16
5.6.40.0100.00313.92
5.6.30.0180.00013.82
5.6.20.0050.01413.82
5.6.10.0140.00313.98
5.6.00.0000.01414.24
5.5.380.0130.00913.85
5.5.370.0040.01313.89
5.5.360.0140.00214.07
5.5.350.0160.00514.44
5.5.340.0160.00814.13
5.5.330.0150.00813.65
5.5.320.0120.00613.82
5.5.310.0090.00713.91
5.5.300.0100.00514.02
5.5.290.0050.01113.98
5.5.280.0110.00714.12
5.5.270.0100.00514.17
5.5.260.0130.00413.87
5.5.250.0110.00713.77
5.5.240.0040.00813.73
5.5.230.0030.01013.88
5.5.220.0100.00613.89
5.5.210.0150.00413.80
5.5.200.0130.01213.80
5.5.190.0130.00914.13
5.5.180.0110.00513.63
5.5.170.0040.01213.63
5.5.160.0070.00713.75
5.5.150.0160.00413.77
5.5.140.0120.00213.89
5.5.130.0110.00813.86
5.5.120.0150.00313.63
5.5.110.0000.01613.48
5.5.100.0110.00713.87
5.5.90.0080.00914.05
5.5.80.0060.00613.94
5.5.70.0170.00314.03
5.5.60.0130.00814.21
5.5.50.0110.01113.80
5.5.40.0120.00613.74
5.5.30.0100.01013.80
5.5.20.0130.00314.19
5.5.10.0000.01714.20
5.5.00.0060.01413.65
5.4.450.0050.00511.34
5.4.440.0060.00311.34
5.4.430.0080.00811.34
5.4.420.0130.00311.34
5.4.410.0070.00411.34
5.4.400.0040.00411.34
5.4.390.0040.01211.34
5.4.380.0040.00411.34
5.4.370.0070.00711.34
5.4.360.0090.00611.34
5.4.350.0100.00311.34
5.4.340.0060.00611.34
5.4.330.0080.00411.34
5.4.320.0100.00311.34
5.4.310.0080.00411.34
5.4.300.0100.00211.34
5.4.290.0050.00511.34
5.4.280.0080.00411.34
5.4.270.0000.01011.34
5.4.260.0110.00411.34
5.4.250.0040.00711.34
5.4.240.0090.00211.34
5.4.230.0090.00611.34
5.4.220.0130.00311.34
5.4.210.0040.00711.34
5.4.200.0070.00711.34
5.4.190.0070.00311.34
5.4.180.0000.01211.34
5.4.170.0090.00611.34
5.4.160.0120.00311.34
5.4.150.0100.00311.34
5.4.140.0040.00811.34
5.4.130.0080.00411.34
5.4.120.0080.00811.34
5.4.110.0060.00911.34
5.4.100.0100.00711.34
5.4.90.0100.00311.34
5.4.80.0030.01011.34
5.4.70.0140.00011.34
5.4.60.0030.00911.34
5.4.50.0050.00711.34
5.4.40.0150.00011.34
5.4.30.0150.00011.34
5.4.20.0080.00811.34
5.4.10.0000.01911.34
5.4.00.0120.00411.34
5.3.290.0030.00811.34
5.3.280.0100.00311.34
5.3.270.0090.00411.34
5.3.260.0120.00411.34
5.3.250.0080.00411.34
5.3.240.0030.00611.34
5.3.230.0030.00611.34
5.3.220.0120.00311.34
5.3.210.0100.00311.34
5.3.200.0090.00411.34
5.3.190.0080.00611.34
5.3.180.0150.00411.34
5.3.170.0140.00011.34
5.3.160.0100.00511.34
5.3.150.0110.00011.34
5.3.140.0050.00911.34
5.3.130.0130.00311.34
5.3.120.0080.00411.34
5.3.110.0050.00511.34
5.3.100.0080.00211.34
5.3.90.0100.00511.34
5.3.80.0070.00711.34
5.3.70.0030.00811.34
5.3.60.0050.00511.34
5.3.50.0110.00011.34
5.3.40.0060.00611.34
5.3.30.0090.00611.34
5.3.20.0000.01211.34
5.3.10.0120.00611.34
5.3.00.0120.00411.34
5.2.170.0040.00711.34
5.2.160.0060.00311.34
5.2.150.0080.00011.34
5.2.140.0040.00711.34
5.2.130.0050.00511.34
5.2.120.0090.00311.34
5.2.110.0110.00311.34
5.2.100.0090.00211.34
5.2.90.0000.01211.34
5.2.80.0060.00611.34
5.2.70.0080.00311.34
5.2.60.0070.00711.34
5.2.50.0040.00811.34
5.2.40.0060.00611.34
5.2.30.0000.00911.34
5.2.20.0000.00911.34
5.2.10.0100.00011.34
5.2.00.0080.00311.34
5.1.60.0090.00011.34
5.1.50.0040.00611.34
5.1.40.0040.00411.34
5.1.30.0050.00511.34
5.1.20.0100.00011.34
5.1.10.0060.00611.34
5.1.00.0070.00211.34
5.0.50.0000.00911.34
5.0.40.0100.00011.34
5.0.30.0050.00311.34
5.0.20.0080.00011.34
5.0.10.0030.00711.34
5.0.00.0060.00211.34
4.4.90.0050.00311.34
4.4.80.0050.00211.34
4.4.70.0060.00011.34
4.4.60.0020.00411.34
4.4.50.0050.00311.34
4.4.40.0040.00411.34
4.4.30.0060.00311.34
4.4.20.0000.00711.34
4.4.10.0020.00411.34
4.4.00.0030.00311.34
4.3.110.0040.00411.34
4.3.100.0030.00311.34
4.3.90.0060.00011.34
4.3.80.0060.00011.34
4.3.70.0030.00611.34
4.3.60.0020.00511.34
4.3.50.0070.00011.34
4.3.40.0040.00411.34
4.3.30.0000.00611.34
4.3.20.0060.00011.34
4.3.10.0070.00011.34
4.3.00.0040.00411.34

preferences:
60.28 ms | 400 KiB | 5 Q