3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$obj) { return $obj; } $o = new StdClass; // No errors foo($o); call_user_func('foo', $o); call_user_func('foo', [$o]); $a[] = $o; $a[] = $o; $a[] = $o; // Warning: Parameter 1 to foo() expected to be a reference, value given in call_user_func('foo', array_slice($a, 0, 1));

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.20.0100.01024.04
8.4.10.0200.00517.70
8.3.150.0180.00020.68
8.3.140.0190.01017.76
8.3.130.0230.00217.66
8.3.120.0240.01017.71
8.3.110.0200.01116.51
8.3.100.0220.01020.27
8.3.90.0230.00321.62
8.3.80.0200.00817.47
8.3.70.0250.00516.59
8.3.60.0260.00816.54
8.3.50.0160.00919.71
8.3.40.0180.01018.11
8.3.30.0270.00218.18
8.3.20.0200.00419.61
8.3.10.0220.00418.96
8.3.00.0070.00720.58
8.2.270.0120.00617.27
8.2.260.0120.01317.86
8.2.250.0170.00616.66
8.2.240.0220.00317.66
8.2.230.0180.01018.63
8.2.220.0220.00226.94
8.2.210.0160.00721.43
8.2.200.0190.00517.54
8.2.190.0180.01116.81
8.2.180.0210.00721.26
8.2.170.0210.00718.38
8.2.160.0230.00420.28
8.2.150.0220.00221.47
8.2.140.0240.00320.99
8.2.130.0210.00321.86
8.2.120.0190.00818.73
8.2.110.0210.00519.80
8.2.100.0210.00417.80
8.2.90.0260.00417.63
8.2.80.0190.00617.70
8.2.70.0210.00517.57
8.2.60.0150.00617.61
8.2.50.0170.00717.62
8.2.40.0210.00218.62
8.2.30.0170.00518.38
8.2.20.0170.00517.79
8.2.10.0150.00817.68
8.2.00.0120.01117.60
8.1.310.0280.00717.25
8.1.300.0200.01118.10
8.1.290.0150.01117.59
8.1.280.0230.00620.96
8.1.270.0290.00219.75
8.1.260.0220.00321.76
8.1.250.0210.00322.63
8.1.240.0140.00819.61
8.1.230.0150.00919.92
8.1.220.0130.00917.52
8.1.210.0180.00417.97
8.1.200.0140.00917.18
8.1.190.0170.00517.20
8.1.180.0140.00917.62
8.1.170.0160.00518.06
8.1.160.0150.00719.72
8.1.150.0130.00917.93
8.1.140.0130.00918.28
8.1.130.0110.00217.42
8.1.120.0140.00817.31
8.1.110.0190.00317.42
8.1.100.0130.00917.46
8.1.90.0120.01017.32
8.1.80.0120.00917.17
8.1.70.0130.00817.33
8.1.60.0170.00717.51
8.1.50.0150.01017.32
8.1.40.0130.01117.43
8.1.30.0180.00817.39
8.1.20.0200.00517.47
8.1.10.0170.00917.41
8.1.00.0180.00717.41
8.0.300.0160.00719.21
8.0.290.0110.00816.67
8.0.280.0070.00517.60
8.0.270.0080.00616.69
8.0.260.0110.00216.92
8.0.250.0140.00016.80
8.0.240.0110.00716.78
8.0.230.0200.00316.86
8.0.220.0140.00716.73
8.0.210.0190.00316.76
8.0.200.0180.00216.90
8.0.190.0140.00716.85
8.0.180.0150.00716.73
8.0.170.0140.00816.82
8.0.160.0130.01016.63
8.0.150.0180.00616.73
8.0.140.0160.00716.73
8.0.130.0140.00715.01
8.0.120.0160.00616.77
8.0.110.0150.00616.71
8.0.100.0190.00316.88
8.0.90.0180.00416.65
8.0.80.0120.01316.71
8.0.70.0170.00616.69
8.0.60.0210.00216.61
8.0.50.0180.00416.73
8.0.30.0180.00717.14
8.0.20.0160.00817.25
8.0.10.0200.00516.97
8.0.00.0160.01016.90
7.4.330.0170.00315.75
7.4.320.0150.00616.28
7.4.300.0170.00416.31
7.4.290.0190.00316.33
7.4.280.0160.00716.36
7.4.270.0120.00816.40
7.4.260.0160.00516.31
7.4.250.0150.00616.42
7.4.240.0120.00516.47
7.4.230.0130.00816.37
7.4.220.0170.01016.32
7.4.210.0170.00716.37
7.4.200.0190.00216.48
7.4.190.0270.00616.17
7.4.180.0300.00716.27
7.4.160.0150.00716.38
7.4.150.0210.00616.78
7.4.140.0190.00617.27
7.4.130.0150.00816.36
7.4.120.0140.00516.42
7.4.110.0110.00516.39
7.4.100.0130.00616.39
7.4.90.0120.01116.28
7.4.80.0150.00717.78
7.4.70.0140.00716.34
7.4.60.0190.00816.34
7.4.50.0120.00816.26
7.4.40.0170.00716.43
7.4.30.0200.00616.36
7.4.20.0240.01016.24
7.4.10.0290.01316.30
7.4.00.0150.00715.53
7.3.330.0130.00614.75
7.3.320.0150.00414.52
7.3.310.0170.00316.09
7.3.300.0140.00716.19
7.3.290.0120.00716.27
7.3.280.0110.01016.26
7.3.270.0170.00816.79
7.3.260.0200.00316.41
7.3.250.0140.00916.24
7.3.240.0120.01016.27
7.3.230.0150.01016.30
7.3.220.0350.00015.95
7.3.210.0160.00916.16
7.3.200.0220.00616.11
7.3.190.0200.00516.33
7.3.180.0160.01016.24
7.3.170.0210.00916.18
7.3.160.0200.00916.21
7.3.150.0220.00915.95
7.3.140.0350.00015.97
7.3.130.0240.01115.88
7.3.120.0300.00315.88
7.3.110.0240.00815.96
7.3.100.0250.00815.81
7.3.90.0220.01016.27
7.3.80.0290.00315.96
7.3.70.0330.00016.11
7.3.60.0230.00416.23
7.3.50.0280.00416.28
7.3.40.0220.01016.17
7.3.30.0330.00015.95
7.3.20.0360.00416.01
7.3.10.0230.00716.19
7.3.00.0160.01116.32
7.2.340.0300.00715.94
7.2.330.0180.00616.22
7.2.320.0200.00516.20
7.2.310.0190.00616.13
7.2.300.0180.00816.31
7.2.290.0190.00516.19
7.2.280.0190.01316.02
7.2.270.0210.01116.29
7.2.260.0300.00316.14
7.2.250.0160.01616.29
7.2.240.0330.00016.07
7.2.230.0250.00716.21
7.2.220.0300.00315.93
7.2.210.0290.00315.91
7.2.200.0320.00916.08
7.2.190.0260.00716.16
7.2.180.0250.00715.88
7.2.170.0260.00716.14
7.2.160.0260.00616.40
7.2.150.0210.01316.24
7.2.140.0330.00316.31
7.2.130.0150.01016.69
7.2.120.0160.00816.75
7.2.110.0160.00816.60
7.2.100.0150.00616.51
7.2.90.0150.00616.47
7.2.80.0180.00516.49
7.2.70.0150.00916.64
7.2.60.0140.00716.69
7.2.50.0140.00716.43
7.2.40.0150.01116.51
7.2.30.0190.00816.69
7.2.20.0210.00316.63
7.2.10.0140.01016.71
7.2.00.0210.00516.56
7.1.330.0280.00415.07
7.1.320.0150.01115.48
7.1.310.0340.00015.38
7.1.300.0190.01215.23
7.1.290.0340.00315.28
7.1.280.0260.00615.01
7.1.270.0220.01115.07
7.1.260.0250.00815.44
7.1.250.0170.00715.54
7.1.240.0210.00815.56
7.1.230.0220.00415.39
7.1.220.0320.00015.45
7.1.210.0220.00915.41
7.1.200.0170.00215.40
7.1.190.0350.00315.08
7.1.180.0310.00315.37
7.1.170.0210.01015.20
7.1.160.0270.00315.25
7.1.150.0280.00315.29
7.1.140.0240.00615.01
7.1.130.0190.01315.26
7.1.120.0310.00015.03
7.1.110.0260.00615.27
7.1.100.0210.01115.27
7.1.90.0270.00415.32
7.1.80.0840.00015.39
7.1.70.0120.00615.93
7.1.60.0190.00516.25
7.1.50.0180.00316.09
7.1.40.0270.00415.20
7.1.30.0280.00314.99
7.1.20.0250.00615.21
7.1.10.0280.00315.14
7.1.00.0220.04018.80
7.0.330.0170.01314.88
7.0.320.0280.00314.95
7.0.310.0280.00314.98
7.0.300.0300.00015.01
7.0.290.0270.00314.89
7.0.280.0250.00614.98
7.0.270.0270.00315.08
7.0.260.0310.00015.18
7.0.250.0250.00714.84
7.0.240.0270.00815.00
7.0.230.0250.00814.74
7.0.220.0290.00414.82
7.0.210.0120.00314.91
7.0.200.0520.00314.85
7.0.190.0070.00715.08
7.0.180.0170.01014.62
7.0.170.0300.00014.90
7.0.160.0270.00314.90
7.0.150.0250.00715.11
7.0.140.0140.01714.92
7.0.130.0340.00414.82
7.0.120.0270.00415.07
7.0.110.0130.03817.68
7.0.100.0170.03117.66
7.0.90.0130.03717.65
7.0.80.0180.03217.54
7.0.70.0180.04017.69
7.0.60.0210.03817.62
7.0.50.0210.02917.62
7.0.40.0240.03617.59
7.0.30.0200.03017.63
7.0.20.0150.03517.70
7.0.10.0110.04117.68
7.0.00.0180.03517.67
5.6.400.0250.01215.54
5.6.390.0160.01015.78
5.6.380.0300.00015.68
5.6.370.0350.00315.53
5.6.360.0280.00315.66
5.6.350.0240.00515.86
5.6.340.0290.00015.81
5.6.330.0250.00415.66
5.6.320.0170.00915.72
5.6.310.0270.00315.64
5.6.300.0220.00715.59
5.6.290.0190.00815.63
5.6.280.0140.00915.62
5.6.270.0230.00315.65
5.6.260.0120.03218.32
5.6.250.0200.03018.31
5.6.240.0150.03518.26
5.6.230.0250.02718.29
5.6.220.0200.03018.48
5.6.210.0180.03218.40
5.6.200.0180.03318.42
5.6.190.0140.03418.47
5.6.180.0120.03618.42
5.6.170.0220.02818.35
5.6.160.0200.03518.42
5.6.150.0150.03518.39
5.6.140.0140.03318.38
5.6.130.0250.03018.49
5.6.120.0150.03918.43
5.6.110.0210.02818.31
5.6.100.0230.03518.19
5.6.90.0230.03418.25
5.6.80.0180.03017.91
5.6.70.0140.03218.08
5.6.60.0120.03618.08
5.6.50.0180.02718.12
5.6.40.0160.03218.01
5.6.30.0170.02917.91
5.6.20.0180.03017.95
5.6.10.0170.03117.87
5.6.00.0220.02717.89

preferences:
31.44 ms | 403 KiB | 5 Q