3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo(&$var) { $var = 2; } $a = 1; foo($a); var_dump($a); // 2 class A { public function do() { foo($this); var_dump($this); // still the same object } public function doo() { $a = new self(); foo($a); var_dump($a); // 2 } }

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.5.60.0060.01116.51
8.5.50.0030.00516.63
8.5.30.0120.00617.96
8.5.20.0080.00920.11
8.5.10.0130.00716.72
8.5.00.0120.01019.82
8.4.210.0120.00821.25
8.4.180.0150.00719.64
8.4.170.0110.00924.02
8.4.160.0100.01123.93
8.4.150.0060.00716.82
8.4.140.0140.00817.59
8.4.130.0060.00418.44
8.4.120.0070.00222.22
8.4.110.0140.00522.29
8.4.100.0120.00917.35
8.4.90.0120.00817.61
8.4.80.0190.00919.43
8.4.70.0160.00919.44
8.4.60.0390.00917.67
8.4.50.0300.00517.29
8.4.40.0410.01117.27
8.4.30.0420.01017.44
8.4.20.0450.00917.44
8.4.10.0460.00917.48
8.3.300.0120.00820.75
8.3.290.0110.01120.76
8.3.280.0100.01118.27
8.3.270.0120.00816.48
8.3.260.0100.01016.30
8.3.250.0110.00418.51
8.3.240.0100.00816.36
8.3.230.0080.00916.60
8.3.220.0220.00416.97
8.3.210.0190.00516.97
8.3.200.0420.00716.97
8.3.190.0350.00716.97
8.3.180.0400.00616.97
8.3.170.0330.00916.97
8.3.160.0380.00516.97
8.3.150.0280.00516.97
8.3.140.0380.00716.97
8.3.130.0140.00616.97
8.3.120.0190.00316.97
8.3.110.0370.00716.97
8.3.100.0360.01116.97
8.3.90.0480.00616.97
8.3.80.0510.00916.97
8.3.70.0410.01116.97
8.3.60.0300.00416.97
8.3.50.0270.00616.97
8.3.40.0370.00817.35
8.3.30.0270.01217.39
8.3.20.0360.00417.40
8.3.10.0250.00217.39
8.3.00.0190.00117.51
8.2.300.0170.01019.77
8.2.290.0080.01120.39
8.2.280.0290.00916.97
8.2.270.0340.00916.97
8.2.260.0390.00316.97
8.2.250.0350.00816.97
8.2.240.0320.00816.97
8.2.230.0170.00416.97
8.2.220.0360.00316.97
8.2.210.0300.01116.97
8.2.200.0340.00916.97
8.2.190.0390.00616.97
8.2.180.0360.00716.97
8.2.170.0380.00817.56
8.2.160.0350.00817.69
8.2.150.0350.01017.29
8.2.140.0350.01017.40
8.2.130.0370.00917.28
8.2.120.0340.01217.41
8.2.110.0330.00417.58
8.2.100.0160.00317.47
8.2.90.0350.00717.46
8.2.80.0410.00917.21
8.2.70.0460.00617.40
8.2.60.0370.00717.33
8.2.50.0380.01117.41
8.2.40.0350.00917.29
8.2.30.0420.00417.15
8.2.20.0360.00417.24
8.2.10.0320.01017.41
8.2.00.0320.00717.47
8.1.340.0110.00818.13

preferences:
24.63 ms | 843 KiB | 5 Q