3v4l.org

run code in 300+ PHP versions simultaneously
<?php function do_action_ref_array( $callback, $args ) { var_dump($args); $args[0] = 'b'; call_user_func_array( $callback, array_slice( $args, 0, 2 ) ); } function filter( $arg1, &$arg2 ) { var_dump( $arg1, $arg2 ); return $arg1; }; class Test { public function run() { do_action_ref_array( 'filter', [1, &$this] ); } } $object = new Test(); $object->run();

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.00716.50
8.3.50.0110.00418.23
8.3.40.0060.01618.97
8.3.30.0040.01118.88
8.3.20.0060.00321.72
8.3.10.0040.00423.65
8.3.00.0030.00521.85
8.2.180.0090.00618.29
8.2.170.0140.00022.96
8.2.160.0140.00719.13
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0030.00519.38
8.2.110.0030.00621.11
8.2.100.0090.00319.52
8.2.90.0000.00917.91
8.2.80.0040.00418.16
8.2.70.0000.00918.05
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0050.00321.20
8.2.30.0000.00819.26
8.2.20.0040.00418.07
8.2.10.0040.00418.11
8.2.00.0040.00419.47
8.1.280.0090.00625.92
8.1.270.0040.00422.24
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00623.75
8.1.230.0000.01222.60
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.34
8.1.190.0080.00017.09
8.1.180.0000.00818.10
8.1.170.0040.00418.70
8.1.160.0040.00418.76
8.1.150.0050.00318.79
8.1.140.0030.00322.14
8.1.130.0040.00420.13
8.1.120.0050.00617.47
8.1.110.0030.00717.34
8.1.100.0040.00417.44
8.1.90.0030.00517.45
8.1.80.0040.00417.47
8.1.70.0030.00317.34
8.1.60.0000.00917.59
8.1.50.0050.00317.40
8.1.40.0040.00417.53
8.1.30.0040.00417.63
8.1.20.0040.00417.60
8.1.10.0040.00417.53
8.1.00.0030.00517.36
8.0.300.0000.00719.60
8.0.290.0080.00016.63
8.0.280.0000.00718.32
8.0.270.0040.00317.26
8.0.260.0050.00218.31
8.0.250.0000.00716.92
8.0.240.0070.00016.99
8.0.230.0070.00016.95
8.0.220.0030.00316.93
8.0.210.0070.00016.74
8.0.200.0030.00516.93
8.0.190.0040.00416.96
8.0.180.0050.00316.88
8.0.170.0090.00016.88
8.0.160.0000.00716.98
8.0.150.0030.00416.85
8.0.140.0050.00216.88
8.0.130.0030.00313.30
8.0.120.0040.00416.82
8.0.110.0030.00516.84
8.0.100.0070.00016.77
8.0.90.0040.00416.95
8.0.80.0030.01316.89
8.0.70.0050.00316.87
8.0.60.0000.00816.87
8.0.50.0050.00316.94
8.0.30.0120.00916.89
8.0.20.0100.01016.94
8.0.10.0000.00816.95
8.0.00.0120.00916.63
7.4.330.0050.00016.66
7.4.320.0030.00316.49
7.4.300.0000.00616.57
7.4.290.0040.00416.68
7.4.280.0000.00816.50
7.4.270.0070.00016.45
7.4.260.0070.00016.60
7.4.250.0030.00316.36
7.4.240.0040.00416.59
7.4.230.0000.00716.63
7.4.220.0060.00316.71
7.4.210.0090.01016.59
7.4.200.0080.00016.46
7.4.160.0060.00916.53
7.4.140.0070.01117.86
7.4.130.0040.01216.66
7.4.120.0140.00716.55
7.4.110.0170.00716.71
7.4.100.0110.00716.51
7.4.90.0060.01716.54
7.4.80.0120.00819.39
7.4.70.0150.00316.55
7.4.60.0120.00616.45
7.4.50.0070.00716.50
7.4.40.0120.00516.40
7.4.00.0070.01014.93
7.3.330.0020.00213.21
7.3.320.0030.00313.34
7.3.310.0040.00416.43
7.3.300.0000.00716.25
7.3.290.0030.00316.29
7.3.280.0040.01116.40
7.3.260.0100.01016.37
7.3.240.0110.00716.46
7.3.230.0090.01216.47
7.3.210.0120.00316.40
7.3.200.0090.00916.41
7.3.190.0060.01516.58
7.3.180.0130.00316.36
7.3.170.0060.01116.23
7.3.160.0060.00916.53
7.3.00.1240.01014.19
7.2.330.0130.01016.71
7.2.320.0140.00516.75
7.2.310.0080.00916.69
7.2.300.0030.01416.74
7.2.290.0120.00616.48
7.2.130.1030.00514.62
7.2.120.0870.00514.46
7.2.110.1030.00314.65
7.2.100.0860.00614.66
7.2.90.1340.00814.62
7.2.80.0940.01514.36
7.2.70.0830.01114.86
7.2.60.1260.00814.92
7.2.50.1080.00514.81
7.2.40.1690.00914.91
7.2.30.1800.00914.87
7.2.20.1870.01015.01
7.2.10.1410.01114.92
7.2.00.2060.01014.80
7.1.250.0680.00513.82
7.0.330.0600.00813.41
5.6.380.0050.01014.25

preferences:
36.22 ms | 400 KiB | 5 Q