3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Fourth drill:"."<br><br>"; class MyClass4 { public $prop1 = "I'm a class property!"; public function __construct() { echo 'The class "', __CLASS__, '" was initiated!<br />'; } public function __destruct() { echo 'The class "', __CLASS__, '" was destroyed.<br />'; } public function __toString() { echo "Using the toString method: "; return $this->getProperty(); } public function setProperty($newval) { $this->prop1 = $newval; } public function getProperty() { return $this->prop1 . "<br />"; } } class MyOtherClass extends MyClass4 { public function newMethod() { echo "From a new method in " . __CLASS__ . ".<br />"; } } // Create a new object $newobj = new MyOtherClass; // Output the object as a string echo $newobj->newMethod(); // Use a method from the parent class. echo $newobj->getProperty(); ?>

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.70.0130.00616.63
8.3.60.0070.00718.55
8.3.50.0110.00622.93
8.3.40.0040.01118.80
8.3.30.0070.00718.67
8.3.20.0070.01020.21
8.3.10.0040.00418.70
8.3.00.0030.00520.65
8.2.190.0110.00416.58
8.2.180.0070.01416.50
8.2.170.0210.00022.96
8.2.160.0070.00720.57
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00021.00
8.2.120.0000.00826.35
8.2.110.0000.01022.06
8.2.100.0000.01118.03
8.2.90.0080.00019.22
8.2.80.0080.00017.97
8.2.70.0040.00417.37
8.2.60.0000.00817.80
8.2.50.0050.00318.09
8.2.40.0000.00720.54
8.2.30.0040.00419.36
8.2.20.0110.00017.60
8.2.10.0040.00418.05
8.2.00.0000.00717.97
8.1.280.0100.00325.92
8.1.270.0060.00322.19
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0000.00922.48
8.1.230.0060.00617.70
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0050.00517.25
8.1.190.0060.00317.36
8.1.180.0000.00818.10
8.1.170.0030.00718.52
8.1.160.0070.00020.80
8.1.150.0000.00818.82
8.1.140.0090.00019.52
8.1.130.0040.00417.71
8.1.120.0040.00417.48
8.1.110.0080.00017.36
8.1.100.0060.00317.36
8.1.90.0000.00717.47
8.1.80.0040.00417.45
8.1.70.0070.00017.49
8.1.60.0040.00417.57
8.1.50.0080.00017.43
8.1.40.0000.00817.43
8.1.30.0000.00917.57
8.1.20.0000.00817.68
8.1.10.0030.00617.54
8.1.00.0040.00417.54
8.0.300.0020.00518.77
8.0.290.0070.00016.58
8.0.280.0030.00318.52
8.0.270.0000.00816.74
8.0.260.0030.00317.33
8.0.250.0030.00316.98
8.0.240.0000.00716.83
8.0.230.0030.00317.00
8.0.220.0040.00416.83
8.0.210.0000.00716.88
8.0.200.0030.00316.95
8.0.190.0000.00916.95
8.0.180.0030.00616.85
8.0.170.0070.00016.91
8.0.160.0000.00716.96
8.0.150.0030.00316.73
8.0.140.0000.00716.82
8.0.130.0060.00013.26
8.0.120.0000.00816.93
8.0.110.0070.00016.85
8.0.100.0030.00516.96
8.0.90.0070.00016.85
8.0.80.0030.01216.79
8.0.70.0040.00416.72
8.0.60.0070.00016.75
8.0.50.0000.00716.90
8.0.30.0070.01117.23
8.0.20.0100.00917.40
8.0.10.0000.00717.09
8.0.00.0140.01716.73
7.4.330.0030.00316.84
7.4.320.0030.00316.50
7.4.300.0000.00816.37
7.4.290.0050.00316.56
7.4.280.0070.00316.50
7.4.270.0070.00016.59
7.4.260.0030.00716.59
7.4.250.0000.00716.47
7.4.240.0000.00716.62
7.4.230.0070.00016.69
7.4.220.0090.00916.38
7.4.210.0040.01016.63
7.4.200.0000.00716.63
7.4.160.0070.00716.48
7.4.150.0060.01117.40
7.4.140.0160.00617.86
7.4.130.0110.00616.54
7.4.120.0110.00616.43
7.4.110.0060.01116.38
7.4.100.0090.01416.51
7.4.90.0070.01016.43
7.4.80.0140.00319.39
7.4.70.0100.00716.55
7.4.60.0130.00316.37
7.4.50.0050.00516.45
7.4.40.0090.00916.55
7.4.30.0140.00416.64
7.4.00.0150.00414.66
7.3.330.0050.00013.09
7.3.320.0000.00513.17
7.3.310.0000.00816.41
7.3.300.0060.00016.31
7.3.290.0000.00716.16
7.3.280.0090.01016.29
7.3.270.0150.00317.40
7.3.260.0050.01116.31
7.3.250.0070.01016.31
7.3.240.0110.00616.32
7.3.230.0100.00716.51
7.3.210.0070.01016.29
7.3.200.0090.00916.55
7.3.190.0060.01116.21
7.3.180.0090.00616.59
7.3.170.0090.00616.56
7.3.160.0000.01616.27
7.2.330.0130.00916.79
7.2.320.0160.00616.79
7.2.310.0110.00516.77
7.2.300.0060.01016.74
7.2.290.0110.00616.58
7.2.60.0060.00617.13
7.1.200.0040.01115.64
7.1.70.0000.00716.93
7.1.60.0140.01119.61
7.1.50.0100.01316.90
7.1.00.0000.08022.35
7.0.200.0070.00316.43
7.0.100.0030.04019.92
7.0.90.0070.04320.14
7.0.80.0030.04320.01
7.0.70.0070.04020.00
7.0.60.0030.04719.99
7.0.50.0100.03320.36
7.0.40.0030.04020.05
7.0.30.0170.02720.11
7.0.20.0100.07720.18
7.0.10.0170.06720.03
7.0.00.0070.08720.14
5.6.280.0100.06721.00
5.6.250.0130.03020.61
5.6.240.0070.05720.52
5.6.230.0030.04320.52
5.6.220.0000.05020.75
5.6.210.0070.03720.57
5.6.200.0030.04021.05
5.6.190.0100.08320.97
5.6.180.0100.07720.95
5.6.170.0100.07721.03
5.6.160.0070.08021.09
5.6.150.0070.08021.06
5.6.140.0100.08321.04
5.6.130.0030.09021.09
5.6.120.0070.08720.96
5.6.110.0000.09021.05
5.6.100.0000.08720.93
5.6.90.0070.09021.04
5.6.80.0030.08020.41
5.6.70.0100.07320.50
5.6.60.0030.06020.46
5.6.50.0070.08320.56
5.6.40.0070.07320.43
5.6.30.0030.05320.46
5.6.20.0030.08320.54
5.6.10.0070.04020.31
5.6.00.0070.08020.46
5.5.380.0030.04020.56
5.5.370.0070.03720.43
5.5.360.0030.04020.42
5.5.350.0000.05020.38
5.5.340.0070.03720.93
5.5.330.0030.05020.79
5.5.320.0130.07720.82
5.5.310.0030.08320.89
5.5.300.0100.07320.89
5.5.290.0100.07720.91
5.5.280.0000.08320.80
5.5.270.0000.06020.78
5.5.260.0030.08720.89
5.5.250.0030.07720.72
5.5.240.0030.08720.02
5.5.230.0100.07320.25
5.5.220.0100.07320.29
5.5.210.0100.04720.32
5.5.200.0000.05320.12
5.5.190.0130.07320.07
5.5.180.0070.08020.09
5.5.160.0030.08020.22
5.5.150.0100.07320.09
5.5.140.0130.07720.24
5.5.130.0170.07020.14
5.5.120.0100.07720.25
5.5.110.0070.08020.25
5.5.100.0070.04720.09
5.5.90.0000.08320.09
5.5.80.0100.07020.11
5.5.70.0130.07019.98
5.5.60.0170.06320.07
5.5.50.0070.04720.16
5.5.40.0070.07320.00
5.5.30.0030.08320.06
5.5.20.0170.07320.16
5.5.10.0170.07019.96
5.5.00.0030.08020.06

preferences:
59.72 ms | 401 KiB | 5 Q