3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { protected $name; protected $age; public function setName($name) { $this->name = $name; } public function setAge($age) { $this->age = $age; } public function getAge() { return $this->age; } public function getName() { return $this->age; } } $person = new Person(); $person->setName("John Doe")->setAge("53"); echo $person->getName(); echo $person->getAge(); class PersonWithChaining { protected $what1; protected $what2; function setWhat($what) { $this->what = $what; return $this; } function setSomethingElseWhat($what2) { $this->what2 = $what2; return $this; } }

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.0110.00718.43
8.3.50.0220.00721.09
8.3.40.0070.01118.84
8.3.30.0150.00018.76
8.3.20.0000.00720.21
8.3.10.0000.00823.83
8.3.00.0000.00819.68
8.2.180.0090.00618.29
8.2.170.0040.01122.96
8.2.160.0040.01120.34
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0090.00926.16
8.2.120.0090.00017.63
8.2.110.0060.00320.47
8.2.100.0030.00917.78
8.2.90.0000.00719.22
8.2.80.0060.00317.97
8.2.70.0030.00517.50
8.2.60.0070.00317.91
8.2.50.0030.00518.07
8.2.40.0030.00519.34
8.2.30.0040.00418.04
8.2.20.0030.00617.76
8.2.10.0000.00818.05
8.2.00.0040.00417.98
8.1.280.0120.00325.92
8.1.270.0150.00320.44
8.1.260.0070.00026.35
8.1.250.0060.00328.09
8.1.240.0040.00721.95
8.1.230.0120.00020.87
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0000.00917.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0000.00818.60
8.1.160.0000.00722.02
8.1.150.0040.00418.86
8.1.140.0000.00817.29
8.1.130.0000.00717.66
8.1.120.0040.00417.32
8.1.110.0040.00417.43
8.1.100.0050.00217.45
8.1.90.0000.00717.40
8.1.80.0040.00417.38
8.1.70.0030.00517.30
8.1.60.0050.00317.50
8.1.50.0080.00017.46
8.1.40.0000.00717.53
8.1.30.0040.00417.68
8.1.20.0070.00017.58
8.1.10.0040.00417.66
8.1.00.0000.00817.54
8.0.300.0080.00018.77
8.0.290.0040.00416.58
8.0.280.0000.00718.32
8.0.270.0000.00717.28
8.0.260.0000.00817.21
8.0.250.0070.00016.86
8.0.240.0030.00316.89
8.0.230.0040.00416.97
8.0.220.0040.00416.91
8.0.210.0040.00416.96
8.0.200.0030.00316.96
8.0.190.0000.00817.03
8.0.180.0050.00316.81
8.0.170.0000.00816.91
8.0.160.0000.00716.94
8.0.150.0070.00016.87
8.0.140.0040.00416.82
8.0.130.0000.00613.27
8.0.120.0000.00816.90
8.0.110.0040.00416.89
8.0.100.0000.00716.92
8.0.90.0040.00416.86
8.0.80.0110.00416.80
8.0.70.0040.00416.76
8.0.60.0030.00316.82
8.0.50.0000.00716.98
8.0.30.0090.00917.20
8.0.20.0110.00917.40
8.0.10.0030.00516.97
8.0.00.0100.00916.72
7.4.330.0000.00615.13
7.4.320.0030.00316.41
7.4.300.0030.00316.56
7.4.290.0030.00616.52
7.4.280.0080.00316.43
7.4.270.0050.00316.38
7.4.260.0070.00016.64
7.4.250.0040.00416.47
7.4.240.0040.00316.56
7.4.230.0050.00316.70
7.4.220.0070.01016.51
7.4.210.0070.01416.55
7.4.200.0030.00316.36
7.4.160.0120.00416.64
7.4.150.0060.01217.40
7.4.140.0100.00717.86
7.4.130.0090.00916.47
7.4.120.0100.00816.53
7.4.110.0160.00616.57
7.4.100.0100.00716.50
7.4.90.0080.00916.50
7.4.80.0090.00819.39
7.4.70.0060.00916.53
7.4.60.0090.00616.64
7.4.50.0000.00916.43
7.4.40.0130.01016.73
7.4.30.0060.01016.44
7.4.00.0090.00614.88
7.3.330.0000.00613.37
7.3.320.0050.00013.35
7.3.310.0070.00016.37
7.3.300.0000.00616.32
7.3.290.0050.01216.34
7.3.280.0060.01316.34
7.3.270.0130.00917.40
7.3.260.0130.00416.37
7.3.250.0090.00816.50
7.3.240.0110.00716.44
7.3.230.0120.00616.56
7.3.210.0090.01316.48
7.3.200.0070.01416.60
7.3.190.0100.01016.65
7.3.180.0070.00716.49
7.3.170.0090.00616.39
7.3.160.0080.01516.52
7.3.00.0080.01116.53
7.2.330.0090.00916.57
7.2.320.0120.00616.52
7.2.310.0060.01116.45
7.2.300.0140.00816.42
7.2.290.0150.00416.60
7.2.130.0180.00416.57
7.2.120.0100.01016.50
7.2.110.0070.01016.73
7.2.100.0070.01116.81
7.2.90.0120.00916.50
7.2.80.0140.00316.93
7.2.70.0090.00616.71
7.2.60.0100.00516.78
7.2.50.0100.00716.63
7.2.40.0130.00816.77
7.2.30.0100.00716.61
7.2.20.0090.00916.47
7.2.10.0140.00316.91
7.2.00.0060.01018.07
7.1.250.0070.01115.33
7.1.240.0120.00415.46
7.1.230.0100.00715.75
7.1.220.0060.00615.63
7.1.210.0030.00915.58
7.1.200.0070.00515.67
7.1.190.0090.00615.33
7.1.180.0090.00315.50
7.1.170.0080.00815.50
7.1.160.0040.01415.72
7.1.150.0110.00415.44
7.1.140.0100.00315.78
7.1.130.0060.00915.75
7.1.120.0120.00615.40
7.1.110.0040.01415.68
7.1.100.0180.00616.74
7.1.90.0110.00715.73
7.1.80.0070.01015.35
7.1.70.0070.00516.22
7.1.60.0070.00917.32
7.1.50.0120.00516.34
7.1.40.0140.00715.61
7.1.30.0090.00315.34
7.1.20.0110.00715.59
7.1.10.0080.00815.59
7.1.00.0060.04118.86
7.0.330.0130.00315.02
7.0.320.0090.00615.17
7.0.310.0030.00715.32
7.0.300.0130.00315.33
7.0.290.0080.00815.08
7.0.280.0070.00715.37
7.0.270.0100.00315.38
7.0.260.0160.00315.31
7.0.250.0120.00815.34
7.0.240.0120.00615.55
7.0.230.0070.00715.51
7.0.220.0100.01015.51
7.0.210.0070.01015.23
7.0.200.0080.00315.96
7.0.190.0130.00315.43
7.0.180.0120.00615.33
7.0.170.0070.01015.23
7.0.160.0030.01015.17
7.0.150.0090.00615.27
7.0.140.0100.00714.98
7.0.130.0070.00815.35
7.0.120.0180.00314.95
7.0.110.0150.00815.08
7.0.100.0070.01115.35
7.0.90.0140.00315.12
7.0.80.0060.00915.10
7.0.70.0100.01015.05
7.0.60.0130.04317.59
7.0.50.0030.04016.69
7.0.40.0080.04516.68
7.0.30.0170.02816.75
7.0.20.0100.02716.68
7.0.10.0030.05116.87
7.0.00.0080.02016.60
5.6.380.0060.00614.31
5.6.370.0150.00314.43
5.6.360.0090.00614.08
5.6.350.0040.01114.40
5.6.340.0060.00614.33
5.6.330.0060.00914.38
5.6.320.0100.00314.30
5.6.310.0040.00714.03
5.6.300.0030.01014.28
5.6.290.0080.00414.55
5.6.280.0100.03517.68
5.6.270.0070.00414.15
5.6.260.0060.00314.29
5.6.250.0040.00814.01
5.6.240.0120.00314.52
5.6.230.0090.00914.25
5.6.220.0110.00814.46
5.6.210.0140.03917.54
5.6.200.0090.04316.13
5.6.190.0050.03817.22
5.6.180.0150.02717.33
5.6.170.0200.01817.43
5.6.160.0070.02217.30
5.6.150.0030.02716.29
5.6.140.0060.04016.23
5.6.130.0040.02616.21
5.6.120.0050.04517.73
5.6.110.0120.04217.71
5.6.100.0030.02817.64
5.6.90.0070.04017.63
5.6.80.0050.04917.41
5.6.70.0130.03717.32
5.6.60.0030.00614.27
5.6.50.0050.00314.22
5.6.40.0000.01014.36
5.6.30.0040.01413.96
5.6.20.0060.00914.33
5.6.10.0040.00914.41
5.6.00.0030.00614.33
5.5.380.0090.00011.16
5.5.370.0030.00911.44
5.5.360.0070.00311.07
5.5.350.0200.03715.81
5.5.340.0080.03414.32
5.5.330.0070.02215.55
5.5.320.0220.02715.61
5.5.310.0150.04315.71
5.5.300.0050.04014.39
5.5.290.0070.02514.49
5.5.280.0080.04115.96
5.5.270.0120.03116.01
5.5.260.0130.04015.98
5.5.250.0100.03215.85
5.5.240.0100.01715.75
5.5.230.0060.00311.09
5.5.220.0040.00710.87
5.5.210.0060.00610.79
5.5.200.0030.00911.05
5.5.190.0060.00611.07
5.5.180.0040.00811.17
5.5.170.0030.00911.18
5.5.160.0040.00911.02
5.5.150.0040.00810.77
5.5.140.0040.00710.99
5.5.130.0080.00410.90
5.5.120.0080.00010.58
5.5.110.0040.00410.52
5.5.100.0070.00711.06
5.5.90.0030.00911.25
5.5.80.0030.00910.75
5.5.70.0040.01211.25
5.5.60.0030.00711.21
5.5.50.0030.00911.25
5.5.40.0030.00311.17
5.5.30.0000.01111.13
5.5.20.0000.01211.07
5.5.10.0060.00310.99
5.5.00.0060.00611.06
5.4.450.0410.03915.28
5.4.440.0400.03515.39
5.4.430.0430.03115.32
5.4.420.0460.02615.22
5.4.410.0450.03415.11
5.4.400.0400.03415.17
5.4.390.0380.03015.11
5.4.380.0360.03815.14
5.4.370.0380.03015.15
5.4.360.0420.02915.15
5.4.350.0280.03814.90
5.4.340.0430.02615.01
5.4.330.0050.00310.78
5.4.320.0310.03815.01
5.4.310.0400.04014.88
5.4.300.0380.04614.92
5.4.290.0360.03114.99
5.4.280.0300.04114.80
5.4.270.0480.03315.04
5.4.260.0430.03615.17
5.4.250.0390.02814.83
5.4.240.0400.03214.98
5.4.230.0470.03915.05
5.4.220.0470.03715.11
5.4.210.0440.02514.97
5.4.200.0360.02615.21
5.4.190.0350.03114.91
5.4.180.0310.03115.07
5.4.170.0410.02615.07
5.4.160.0480.03014.93
5.4.150.0380.03915.13
5.4.140.0470.02013.44
5.4.130.0440.03113.56
5.4.120.0590.04113.69
5.4.110.0330.02813.79
5.4.100.0320.02913.60
5.4.90.0390.03113.87
5.4.80.0400.03813.65
5.4.70.0180.02513.69
5.4.60.0080.02813.36
5.4.50.0040.02013.53
5.4.40.0070.01813.54
5.4.30.0050.03813.76
5.4.20.0030.03513.65
5.4.10.0050.00310.81
5.4.00.0040.00411.09

preferences:
63.03 ms | 401 KiB | 5 Q