3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { protected $val; public function __construct($newVal = 'default') { $this->val = $newVal; } public function output(MyClass $subject) { echo $subject->val, "\n"; } } $obj1 = new MyClass(); $obj2 = new MyClass("hello world"); $obj1->output($obj2); // Output: hello world

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.0100.00716.63
8.3.50.0070.01121.98
8.3.40.0120.00318.98
8.3.30.0110.00718.45
8.3.20.0040.00420.34
8.3.10.0040.00423.61
8.3.00.0050.00319.50
8.2.180.0100.01016.48
8.2.170.0090.00622.96
8.2.160.0130.00020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00817.50
8.2.120.0000.00826.35
8.2.110.0000.01020.35
8.2.100.0000.01218.03
8.2.90.0030.00519.21
8.2.80.0000.00817.97
8.2.70.0050.00517.63
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0030.00619.41
8.2.30.0040.00420.61
8.2.20.0030.00617.69
8.2.10.0020.00518.06
8.2.00.0070.00017.99
8.1.280.0060.01025.92
8.1.270.0040.00423.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00723.92
8.1.230.0080.00419.56
8.1.220.0050.00317.74
8.1.210.0090.00018.77
8.1.200.0030.00617.25
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0040.00418.63
8.1.160.0000.00821.83
8.1.150.0040.00418.79
8.1.140.0000.00919.56
8.1.130.0030.00517.63
8.1.120.0000.00717.30
8.1.110.0050.00217.39
8.1.100.0030.00317.41
8.1.90.0000.00717.45
8.1.80.0000.00817.38
8.1.70.0000.00717.27
8.1.60.0030.00517.62
8.1.50.0060.00317.56
8.1.40.0000.00817.48
8.1.30.0040.00417.59
8.1.20.0040.00417.62
8.1.10.0000.00917.50
8.1.00.0030.00617.52
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.32
8.0.270.0030.00617.25
8.0.260.0030.00317.30
8.0.250.0000.00717.05
8.0.240.0040.00416.88
8.0.230.0030.00316.87
8.0.220.0070.00016.93
8.0.210.0050.00316.90
8.0.200.0030.00317.00
8.0.190.0000.00816.87
8.0.180.0000.00716.79
8.0.170.0000.00816.81
8.0.160.0000.00716.79
8.0.150.0070.00016.70
8.0.140.0030.00316.67
8.0.130.0060.00013.42
8.0.120.0040.00416.75
8.0.110.0000.00816.88
8.0.100.0070.00017.00
8.0.90.0040.00416.80
8.0.80.0060.00916.81
8.0.70.0000.00716.84
8.0.60.0000.00716.73
8.0.50.0040.00416.75
8.0.30.0140.00417.01
8.0.20.0120.01017.40
8.0.10.0040.00417.08
8.0.00.0110.00716.80
7.4.330.0000.00516.76
7.4.320.0050.00216.54
7.4.300.0030.00316.58
7.4.290.0000.00616.53
7.4.280.0060.00316.60
7.4.270.0040.00316.62
7.4.260.0050.00216.58
7.4.250.0080.00016.54
7.4.240.0060.00116.46
7.4.230.0070.00016.41
7.4.220.0160.00316.53
7.4.210.0070.00716.51
7.4.200.0030.00416.71
7.4.160.0110.00616.53
7.4.150.0130.00717.40
7.4.140.0120.00717.86
7.4.130.0100.01316.75
7.4.120.0110.00616.55
7.4.110.0100.01016.25
7.4.100.0060.01316.50
7.4.90.0100.00716.73
7.4.80.0140.00719.39
7.4.70.0090.00916.60
7.4.60.0040.01216.64
7.4.50.0040.00816.43
7.4.40.0120.00416.53
7.4.30.0110.00616.57
7.4.00.0060.00914.84
7.3.330.0000.00513.05
7.3.320.0000.00513.32
7.3.310.0040.00416.13
7.3.300.0030.00316.24
7.3.290.0070.00816.22
7.3.280.0110.00616.21
7.3.270.0040.01217.40
7.3.260.0140.00316.21
7.3.240.0100.00816.36
7.3.230.0040.01316.41
7.3.210.0080.00816.29
7.3.200.0130.00316.29
7.3.190.0070.01016.43
7.3.180.0060.01016.27
7.3.170.0110.01116.30
7.3.160.0200.00316.38
7.2.330.0100.00716.83
7.2.320.0030.02216.35
7.2.310.0120.01216.61
7.2.300.0130.00316.75
7.2.290.0100.01016.66
7.2.60.0130.01016.89
7.2.00.0140.00419.17
7.1.200.0030.01015.83
7.1.100.0070.01017.95
7.1.70.0040.00417.16
7.1.60.0110.01419.48
7.1.50.0070.01616.94
7.1.00.0000.08022.48
7.0.200.0140.01014.59
7.0.60.0100.08019.83
7.0.50.0030.04017.88
7.0.40.0030.04720.14
7.0.30.0330.08020.17
7.0.20.0300.06320.03
7.0.10.0070.04320.16
7.0.00.0130.06320.33
5.6.280.0000.06021.13
5.6.210.0070.06320.70
5.6.200.0100.07018.16
5.6.190.0070.04720.33
5.6.180.0270.07320.55
5.6.170.0230.08720.45
5.6.160.0170.07020.71
5.6.150.0030.05018.28
5.6.140.0130.07318.21
5.6.130.0030.07018.14
5.6.120.0100.08321.03
5.6.110.0030.09021.04
5.6.100.0000.04321.13
5.6.90.0070.04720.97
5.6.80.0170.06320.48
5.5.350.4370.04020.45
5.5.340.0070.03317.98
5.5.330.0000.06720.31
5.5.320.0070.04020.42
5.5.310.0130.06720.34
5.5.300.0130.06318.08
5.5.290.0130.04717.98
5.5.280.0030.04020.97
5.5.270.0030.07020.77
5.5.260.0100.03720.89
5.5.250.0100.08320.71
5.5.240.0300.06720.19

preferences:
46.23 ms | 401 KiB | 5 Q