3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $_name; private $_job; private $_age; public function __construct($name, $job, $age) { $this->_name = $name; $this->_job = $job; $this->_age = $age; } public function changeJob($newjob) { $this->_job = $newjob; } public function happyBirthday() { ++$this->_age; } } // Create two new people $person1 = new Person("Tom", "Button-Pusher", 34); $person2 = new Person("John", "Lever Puller", 41); // Output their starting point echo "<pre>Person 1: ", print_r($person1, TRUE), "</pre>"; echo "<pre>Person 2: ", print_r($person2, TRUE), "</pre>"; // Give Tom a promotion and a birthday $person1->changeJob("Box-Mover"); $person1->happyBirthday(); // John just gets a year older $person2->happyBirthday(); // Output the ending values echo "<pre>Person 1: ", print_r($person1, TRUE), "</pre>"; echo "<pre>Person 2: ", print_r($person2, TRUE), "</pre>"; ?>

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.0070.01518.55
8.3.50.0090.00521.92
8.3.40.0140.00018.84
8.3.30.0040.01119.09
8.3.20.0060.00320.46
8.3.10.0080.00022.10
8.3.00.0030.00522.45
8.2.180.0140.00416.88
8.2.170.0040.01122.96
8.2.160.0060.00918.60
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0030.00519.23
8.2.110.0030.00722.25
8.2.100.0030.00719.25
8.2.90.0030.00619.23
8.2.80.0040.00417.97
8.2.70.0090.00017.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0040.00418.33
8.2.30.0040.00418.22
8.2.20.0070.00017.75
8.2.10.0000.00717.79
8.2.00.0030.00717.64
8.1.280.0120.00625.92
8.1.270.0040.00422.14
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0090.00022.59
8.1.230.0070.00420.89
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00917.23
8.1.190.0040.00417.50
8.1.180.0000.00818.10
8.1.170.0060.00318.65
8.1.160.0080.00321.88
8.1.150.0060.00318.61
8.1.140.0040.00417.46
8.1.130.0000.00717.91
8.1.120.0030.00617.39
8.1.110.0030.00517.38
8.1.100.0050.00317.32
8.1.90.0000.00717.32
8.1.80.0030.00317.45
8.1.70.0000.00717.25
8.1.60.0120.00017.52
8.1.50.0050.00317.60
8.1.40.0050.00217.60
8.1.30.0000.00817.55
8.1.20.0040.00417.67
8.1.10.0040.00417.51
8.1.00.0040.00417.54
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0030.00318.48
8.0.270.0030.00317.33
8.0.260.0040.00416.76
8.0.250.0030.00316.92
8.0.240.0070.00016.97
8.0.230.0050.00216.82
8.0.220.0080.00016.85
8.0.210.0030.00316.83
8.0.200.0000.00616.92
8.0.190.0000.00716.82
8.0.180.0070.00416.80
8.0.170.0000.00816.91
8.0.160.0000.00716.68
8.0.150.0080.00016.70
8.0.140.0040.00416.83
8.0.130.0030.00313.38
8.0.120.0060.00316.79
8.0.110.0000.00816.91
8.0.100.0040.00416.92
8.0.90.0030.00516.73
8.0.80.0030.01816.82
8.0.70.0040.00416.84
8.0.60.0000.00816.89
8.0.50.0070.00016.83
8.0.30.0100.00917.18
8.0.20.0090.01017.44
8.0.10.0000.00716.93
8.0.00.0120.00916.80
7.4.330.0020.00215.00
7.4.320.0040.00416.61
7.4.300.0070.00016.55
7.4.290.0040.00416.54
7.4.280.0040.00416.60
7.4.270.0000.00816.51
7.4.260.0000.00716.64
7.4.250.0080.00016.51
7.4.240.0020.00516.53
7.4.230.0030.00316.45
7.4.220.0070.01016.55
7.4.210.0120.00616.63
7.4.200.0070.00016.75
7.4.190.0030.00416.70
7.4.160.0130.00816.57
7.4.150.0230.00017.40
7.4.140.0100.00817.86
7.4.130.0050.01116.55
7.4.120.0080.01016.44
7.4.110.0140.00316.48
7.4.100.0110.00616.46
7.4.90.0180.00016.62
7.4.80.0070.01019.39
7.4.70.0100.00616.45
7.4.60.0150.00316.49
7.4.50.0060.00316.43
7.4.40.0060.00922.77
7.4.30.0060.00916.53
7.4.00.0060.01015.08
7.3.330.0030.00213.06
7.3.320.0000.00613.29
7.3.310.0000.00716.17
7.3.300.0000.00716.27
7.3.290.0000.01616.31
7.3.280.0080.00816.19
7.3.270.0110.00717.40
7.3.260.0210.00016.61
7.3.250.0040.01316.37
7.3.240.0090.00916.42
7.3.230.0070.01416.55
7.3.210.0090.00916.35
7.3.200.0180.00419.39
7.3.190.0140.00316.25
7.3.180.0090.00616.60
7.3.170.0030.01716.27
7.3.160.0120.00416.40
7.3.120.0060.00914.63
7.2.330.0090.00916.59
7.2.320.0110.00716.61
7.2.310.0150.00616.75
7.2.300.0080.00816.68
7.2.290.0120.00416.63
7.2.00.0000.01519.32
7.1.100.0100.00717.95
7.1.70.0040.00417.11
7.1.60.0040.00816.86
7.1.50.0130.01016.88
7.1.00.0100.07022.41
7.0.200.0030.01216.88
7.0.140.0070.06721.95
7.0.60.0000.04719.96
7.0.50.0030.05018.00
7.0.40.0030.04720.11
7.0.30.0230.08320.20
7.0.20.0270.03720.25
7.0.10.0130.07720.30
7.0.00.0030.05320.24
5.6.280.0030.07021.03
5.6.210.0100.07320.75
5.6.200.0170.07718.18
5.6.190.0130.04720.62
5.6.180.0200.07020.42
5.6.170.0130.04320.41
5.6.160.0170.07320.50
5.6.150.0070.08018.15
5.6.140.0130.07718.18
5.6.130.0030.06018.16
5.6.120.0070.07021.13
5.6.110.0070.08021.02
5.6.100.0170.07320.89
5.6.90.0130.08320.98
5.6.80.0100.03720.31
5.5.350.0170.07320.43
5.5.340.0130.07317.98
5.5.330.0000.04720.44
5.5.320.0030.06320.35
5.5.310.0230.06320.41
5.5.300.0070.08017.98
5.5.290.0030.05717.92
5.5.280.0030.04020.74
5.5.270.0000.09020.96
5.5.260.0030.06720.95
5.5.250.0030.05320.79
5.5.240.0000.08020.27
5.4.450.0870.04319.49
5.4.440.0100.06019.63
5.4.430.0130.05019.41
5.4.420.0030.06319.36
5.4.410.0170.04719.11
5.4.400.1130.00018.84
5.4.390.0930.00018.48
5.4.380.0230.05318.80
5.4.370.0370.05318.55
5.4.360.0330.04018.60
5.4.350.0200.05018.77
5.4.340.0230.06718.71
5.4.320.0040.04512.50
5.4.310.0050.04212.50
5.4.300.0070.03712.51
5.4.290.0080.04412.50
5.4.280.0060.03712.41
5.4.270.0230.04019.00
5.4.260.0100.07019.02
5.4.250.0200.06019.09
5.4.240.0270.05718.93
5.4.230.0200.04718.90
5.4.220.0170.05318.65
5.4.210.0070.06718.95
5.4.200.0070.06718.96
5.4.190.0030.08018.73
5.4.180.0100.06018.95
5.4.170.0130.06318.84
5.4.160.0130.04718.60
5.4.150.0130.04718.92
5.4.140.0100.07016.37
5.4.130.0130.04716.41
5.4.120.0130.04716.25
5.4.110.0130.05716.36
5.4.100.0170.06716.65
5.4.90.0000.06316.36
5.4.80.0000.06016.54
5.4.70.0100.04716.35
5.4.60.0230.05316.49
5.4.50.0070.05316.50
5.4.40.0200.05316.68
5.4.30.0100.06716.44
5.4.20.0100.05716.52
5.4.10.0100.05716.41
5.4.00.0070.05016.03
5.3.290.0120.04612.80
5.3.280.0170.05314.74
5.3.270.0130.07314.69
5.3.260.0170.06014.45
5.3.250.0130.06314.64
5.3.240.0100.06314.52
5.3.230.0070.05314.74
5.3.220.0130.06314.75
5.3.210.0100.06014.56
5.3.200.0100.06714.71
5.3.190.0030.05714.58
5.3.180.0130.06314.65
5.3.170.0070.05014.79
5.3.160.0200.04014.64
5.3.150.0130.06314.73
5.3.140.0130.04314.65
5.3.130.0100.05714.56
5.3.120.0030.05714.72
5.3.110.0170.06014.64
5.3.100.0030.06714.13
5.3.90.0000.07714.19
5.3.80.0100.06714.10
5.3.70.0100.05014.20
5.3.60.0030.05314.23
5.3.50.0230.03713.87
5.3.40.0170.05714.03
5.3.30.0000.07313.99
5.3.20.0070.06013.79
5.3.10.0100.05713.74
5.3.00.0030.05713.72
5.2.170.0130.05311.24
5.2.160.0130.03711.23
5.2.150.0070.04011.37
5.2.140.0030.06311.14
5.2.130.0000.04711.18
5.2.120.0070.03711.02
5.2.110.0100.03311.10
5.2.100.0130.04711.20
5.2.90.0030.04311.19
5.2.80.0100.04711.07
5.2.70.0130.03311.07
5.2.60.0170.05011.24
5.2.50.0000.05310.87
5.2.40.0070.04010.91
5.2.30.0070.05311.06
5.2.20.0170.04311.05
5.2.10.0030.05310.95
5.2.00.0070.04010.74
5.1.60.0030.0339.93
5.1.50.0030.04710.03
5.1.40.0130.04010.04
5.1.30.0070.05010.35
5.1.20.0000.05010.35
5.1.10.0070.03310.11
5.1.00.0100.04710.07
5.0.50.0030.0308.63
5.0.40.0070.0338.42
5.0.30.0030.0408.21
5.0.20.0100.0308.30
5.0.10.0030.0308.15
5.0.00.0000.0478.25
4.4.90.0030.0206.36
4.4.80.0030.0306.36
4.4.70.0100.0206.36
4.4.60.0030.0206.36
4.4.50.0070.0206.36
4.4.40.0070.0306.36
4.4.30.0000.0276.36
4.4.20.0000.0276.36
4.4.10.0070.0176.36
4.4.00.0100.0276.36
4.3.110.0100.0236.36
4.3.100.0030.0276.36
4.3.90.0070.0236.36
4.3.80.0100.0336.36
4.3.70.0030.0276.36
4.3.60.0030.0206.36
4.3.50.0070.0276.36
4.3.40.0000.0436.36
4.3.30.0030.0206.36
4.3.20.0030.0206.36
4.3.10.0030.0206.36
4.3.00.0030.0276.99

preferences:
49.46 ms | 401 KiB | 5 Q