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 my_callback( ...$b ); // OK my_callback( ...$c ); // OK //$callback( true ); // Fatal error: passing a value when reference is expected. $callback( $a ); // OK $callback( ...$b ); // OK $callback( ...$c ); // 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.0120.00618.55
8.3.50.0130.00721.92
8.3.40.0140.00318.84
8.3.30.0000.01518.54
8.3.20.0080.00021.90
8.3.10.0030.00520.38
8.3.00.0080.00023.48
8.2.180.0140.00018.64
8.2.170.0090.00622.96
8.2.160.0130.00019.37
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0100.00022.07
8.2.100.0120.00017.91
8.2.90.0030.00620.55
8.2.80.0050.00317.97
8.2.70.0040.00417.93
8.2.60.0100.00018.22
8.2.50.0030.00618.10
8.2.40.0050.00319.28
8.2.30.0040.00419.25
8.2.20.0070.00017.95
8.2.10.0000.00719.39
8.2.00.0070.00019.20
8.1.280.0060.00925.92
8.1.270.0060.00322.31
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.29
8.1.230.0040.00721.04
8.1.220.0040.00417.79
8.1.210.0060.00318.91
8.1.200.0000.00817.35
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0040.00418.44
8.1.160.0000.00718.81
8.1.150.0000.00718.86
8.1.140.0040.00422.06
8.1.130.0000.00720.07
8.1.120.0050.00317.39
8.1.110.0030.00517.35
8.1.100.0000.00917.35
8.1.90.0000.00817.55
8.1.80.0040.00417.47
8.1.70.0000.00817.49
8.1.60.0080.00017.60
8.1.50.0030.00617.36
8.1.40.0000.00917.59
8.1.30.0050.00317.51
8.1.20.0060.00317.55
8.1.10.0040.00417.62
8.1.00.0040.00417.48
8.0.300.0100.00519.58
8.0.290.0070.00016.63
8.0.280.0070.00018.33
8.0.270.0030.00317.14
8.0.260.0030.00320.08
8.0.250.0040.00417.02
8.0.240.0080.00017.05
8.0.230.0000.00717.05
8.0.220.0000.00716.95
8.0.210.0000.00717.01
8.0.200.0060.00016.89
8.0.190.0090.00017.03
8.0.180.0040.00416.97
8.0.170.0110.00016.99
8.0.160.0000.01016.96
8.0.150.0070.00016.92
8.0.140.0040.00416.96
8.0.130.0030.00313.41
8.0.120.0000.00816.97
8.0.110.0080.00016.93
8.0.100.0070.00016.77
8.0.90.0040.00416.86
8.0.80.0100.00416.92
8.0.70.0000.00716.85
8.0.60.0000.00716.91
8.0.50.0040.00417.08
8.0.30.0170.01017.14
8.0.20.0060.01217.23
8.0.10.0040.00417.12
8.0.00.0120.00916.73
7.4.330.0050.00015.55
7.4.320.0070.00016.45
7.4.300.0050.00216.65
7.4.290.0000.00716.66
7.4.280.0040.00416.61
7.4.270.0030.00716.52
7.4.260.0030.00316.49
7.4.250.0080.00016.58
7.4.240.0050.00216.51
7.4.230.0030.00316.64
7.4.220.0050.00216.55
7.4.210.0070.00916.61
7.4.200.0070.00016.68
7.4.140.0180.00317.86
7.4.130.0210.00316.58
7.4.120.0100.00616.57
7.4.110.0060.01116.67
7.4.100.0130.00616.59
7.4.90.0090.00916.52
7.4.80.0070.01119.39
7.4.70.0120.00616.49
7.4.60.0060.01316.75
7.4.50.0090.00616.38
7.4.40.0150.00616.70
7.4.00.0090.00315.16
7.3.330.0060.00013.14
7.3.320.0000.00513.34
7.3.310.0030.00316.35
7.3.300.0030.00516.38
7.3.290.0070.00016.28
7.3.280.0090.01016.36
7.3.260.0090.00916.40
7.3.240.0070.01116.39
7.3.230.0160.00616.43
7.3.210.0170.00016.47
7.3.200.0110.01016.37
7.3.190.0140.00716.36
7.3.180.0110.00516.61
7.3.170.0080.00816.42
7.3.160.0130.00316.31
7.3.70.0140.00314.46
7.3.60.0040.01314.52
7.3.50.0060.01314.49
7.3.40.0110.00814.36
7.3.30.0080.01214.63
7.3.20.0170.01014.50
7.3.10.0120.01214.29
7.3.00.0160.00314.89
7.2.330.0100.00716.54
7.2.320.0090.01316.65
7.2.310.0060.01716.50
7.2.300.0110.00816.52
7.2.290.0060.00916.69
7.2.200.0080.00814.24
7.2.190.0000.01914.41
7.2.180.0110.01314.35
7.2.170.0120.00614.45
7.2.160.0030.01014.20
7.2.150.0120.00914.56
7.2.140.0150.01114.28
7.2.130.0160.00314.66
7.2.120.0220.00014.81
7.2.110.0170.00814.37
7.2.100.0510.00714.73
7.2.90.0100.01014.57
7.2.80.0100.01014.67
7.2.70.0170.00314.65
7.2.60.0160.00814.79
7.2.50.0110.00814.50
7.2.40.0140.00714.61
7.2.30.0130.01014.80
7.2.20.0140.01114.72
7.2.10.0140.00714.56
7.2.00.0090.01214.61
7.1.300.0130.01013.77
7.1.290.0200.00013.73
7.1.280.0100.01014.04
7.1.270.0160.00613.46
7.1.260.0110.01113.91
7.1.250.0120.00613.63
7.1.240.0070.00713.72
7.1.230.0150.00613.56
7.1.220.0110.00713.53
7.1.210.0090.00613.68
7.1.200.0150.00413.59
7.1.190.0170.00313.66
7.1.180.0140.01113.38
7.1.170.0130.01013.56
7.1.160.0110.00813.55
7.1.150.0110.00313.38
7.1.140.0130.00613.66
7.1.130.0080.01013.43
7.1.120.0150.00413.61
7.1.110.0100.00513.67
7.1.100.0410.00913.64
7.1.90.0200.00313.63
7.1.80.0160.00513.61
7.1.70.0190.00313.25
7.1.60.0180.00513.34
7.1.50.0090.00613.73
7.1.40.0160.00813.51
7.1.30.0120.01213.60
7.1.20.0160.00713.69
7.1.10.0140.00813.61
7.1.00.0110.01113.33
7.0.330.0130.00013.19
7.0.320.0150.00013.30
7.0.310.0130.00513.23
7.0.300.0120.00413.12
7.0.290.0090.00913.33
7.0.280.0140.01113.35
7.0.270.0110.01113.43
7.0.260.0070.00713.20
7.0.250.0090.00513.23
7.0.240.0150.00613.30
7.0.230.0100.00813.47
7.0.220.0160.00412.91
7.0.210.0080.01113.32
7.0.200.0100.01013.37
7.0.190.0100.01712.83
7.0.180.0100.01313.25
7.0.170.0090.00713.09
7.0.160.0140.00713.23
7.0.150.0220.00313.06
7.0.140.0150.00613.27
7.0.130.0210.00413.11
7.0.120.0100.00513.10
7.0.110.0090.01213.43
7.0.100.0270.00613.52
7.0.90.0130.00513.34
7.0.80.0120.01213.23
7.0.70.0080.01213.20
7.0.60.0140.01412.80
7.0.50.0150.00413.21
7.0.40.0110.00713.33
7.0.30.0170.00613.32
7.0.20.0120.00413.46
7.0.10.0340.00713.12
7.0.00.0150.00813.41
5.6.400.0110.00414.25
5.6.390.0080.00814.11
5.6.380.0060.01213.82
5.6.370.0100.00814.57
5.6.360.0120.01414.52
5.6.350.0140.00714.59
5.6.340.0150.01014.38
5.6.330.0140.00714.29
5.6.320.0000.01414.26
5.6.310.0040.01614.36
5.6.300.0180.00014.21
5.6.290.0100.01014.28
5.6.280.0130.00514.28
5.6.270.0070.01114.13
5.6.260.0160.00514.57
5.6.250.0140.00314.39
5.6.240.0030.01414.20
5.6.230.0140.00614.05
5.6.220.0130.00813.95
5.6.210.0100.00714.16
5.6.200.0070.01114.11
5.6.190.0040.01613.96
5.6.180.0070.01014.09
5.6.170.0190.00314.43
5.6.160.0100.00514.31
5.6.150.0170.00314.17
5.6.140.0140.00914.04
5.6.130.0160.00514.35
5.6.120.0130.01014.41
5.6.110.0060.01314.23
5.6.100.0080.01114.20
5.6.90.0050.01514.29
5.6.80.0100.00914.18
5.6.70.0070.01413.88
5.6.60.0070.01313.98
5.6.50.0060.01414.36
5.6.40.0080.00814.20
5.6.30.0150.00714.10
5.6.20.0160.00314.27
5.6.10.0100.00714.30
5.6.00.0120.00914.14
5.5.380.0130.00514.16
5.5.370.0060.01113.53
5.5.360.0170.00013.69
5.5.350.0080.01013.79
5.5.340.0130.01014.02
5.5.330.0090.01213.98
5.5.320.0120.00813.67
5.5.310.0170.00313.91
5.5.300.0130.00713.75
5.5.290.0150.00514.35
5.5.280.0120.00813.68
5.5.270.0130.00813.93
5.5.260.0150.00314.36
5.5.250.0110.00714.12
5.5.240.0150.00813.77
5.5.230.0170.00713.65
5.5.220.0150.00414.06
5.5.210.0140.01113.93
5.5.200.0070.01414.05
5.5.190.0060.01513.73
5.5.180.0140.01014.08
5.5.170.0080.01213.73
5.5.160.0120.00813.86
5.5.150.0160.00314.02
5.5.140.0080.00413.83
5.5.130.0100.00514.10
5.5.120.0090.00513.75
5.5.110.0190.00613.81
5.5.100.0050.00814.02
5.5.90.0050.01413.93
5.5.80.0100.00513.96
5.5.70.0090.00413.96
5.5.60.0100.00813.64
5.5.50.0070.01113.95
5.5.40.0060.00613.71
5.5.30.0090.00913.80
5.5.20.0090.00613.53
5.5.10.0050.01013.48
5.5.00.0080.00413.47
5.4.450.0110.00511.34
5.4.440.0110.00711.34
5.4.430.0110.00411.34
5.4.420.0110.00411.34
5.4.410.0060.00811.34
5.4.400.0030.00911.34
5.4.390.0170.00011.34
5.4.380.0040.00911.34
5.4.370.0110.00411.34
5.4.360.0000.00911.34
5.4.350.0080.00811.34
5.4.340.0080.00411.34
5.4.330.0040.01411.34
5.4.320.0080.00411.34
5.4.310.0040.00811.34
5.4.300.0000.01011.34
5.4.290.0030.00611.34
5.4.280.0050.00511.34
5.4.270.0080.00811.34
5.4.260.0030.00911.34
5.4.250.0100.00511.34
5.4.240.0000.01011.34
5.4.230.0000.00911.34
5.4.220.0100.00311.34
5.4.210.0090.00011.34
5.4.200.0030.00611.34
5.4.190.0060.00311.34
5.4.180.0090.00011.34
5.4.170.0070.00311.34
5.4.160.0040.00411.34
5.4.150.0030.00511.34
5.4.140.0000.01411.34
5.4.130.0030.01211.34
5.4.120.0040.00811.34
5.4.110.0060.00311.34
5.4.100.0030.00611.34
5.4.90.0080.00611.34
5.4.80.0150.00011.34
5.4.70.0090.00211.34
5.4.60.0030.01011.34
5.4.50.0090.00011.34
5.4.40.0000.01211.34
5.4.30.0110.00611.34
5.4.20.0080.00411.34
5.4.10.0050.00511.34
5.4.00.0080.00411.34
5.3.290.0080.00411.34
5.3.280.0050.00911.34
5.3.270.0030.01011.34
5.3.260.0070.00011.34
5.3.250.0060.00611.34
5.3.240.0020.00711.34
5.3.230.0110.00411.34
5.3.220.0060.00611.34
5.3.210.0040.00411.34
5.3.200.0110.00311.34
5.3.190.0080.00411.34
5.3.180.0090.00411.34
5.3.170.0130.00311.34
5.3.160.0060.00611.34
5.3.150.0070.00311.34
5.3.140.0030.00711.34
5.3.130.0080.00411.34
5.3.120.0080.00411.34
5.3.110.0060.00311.34
5.3.100.0030.00911.34
5.3.90.0090.00611.34
5.3.80.0030.00911.34
5.3.70.0000.01111.34
5.3.60.0140.00011.34
5.3.50.0100.00511.34
5.3.40.0080.00311.34
5.3.30.0120.00011.34
5.3.20.0090.00311.34
5.3.10.0050.00511.34
5.3.00.0060.00611.34
5.2.170.0040.00811.34
5.2.160.0140.00011.34
5.2.150.0040.00411.34
5.2.140.0080.00411.34
5.2.130.0060.00611.34
5.2.120.0050.00811.34
5.2.110.0030.00611.34
5.2.100.0050.00511.34
5.2.90.0030.00711.34
5.2.80.0070.00711.34
5.2.70.0000.00811.34
5.2.60.0040.00711.34
5.2.50.0060.00311.34
5.2.40.0070.00211.34
5.2.30.0060.00311.34
5.2.20.0080.00411.34
5.2.10.0080.00411.34
5.2.00.0070.00011.34
5.1.60.0030.00511.34
5.1.50.0080.00011.34
5.1.40.0100.00311.34
5.1.30.0050.00511.34
5.1.20.0130.00011.34
5.1.10.0060.00611.34
5.1.00.0030.00711.34
5.0.50.0000.00811.34
5.0.40.0050.00011.34
5.0.30.0040.00411.34
5.0.20.0090.00011.34
5.0.10.0050.00011.34
5.0.00.0030.00811.34
4.4.90.0060.00011.34
4.4.80.0070.00011.34
4.4.70.0030.00311.34
4.4.60.0050.00211.34
4.4.50.0070.00011.34
4.4.40.0040.00411.34
4.4.30.0070.00411.34
4.4.20.0030.00311.34
4.4.10.0000.00711.34
4.4.00.0020.00611.34
4.3.110.0020.00211.34
4.3.100.0000.00511.34
4.3.90.0060.00311.34
4.3.80.0000.00611.34
4.3.70.0060.00211.34
4.3.60.0020.00211.34
4.3.50.0030.00311.34
4.3.40.0070.00011.34
4.3.30.0050.00011.34
4.3.20.0000.00511.34
4.3.10.0000.00411.34
4.3.00.0020.00211.34

preferences:
69.48 ms | 401 KiB | 5 Q