3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $prop1 = "I'm a class property!"; public function setProperty($newval) { $this->prop1 = $newval; } public function getProperty() { return $this->prop1 . "<br/>"; } } $obj = new MyClass;// Class instantiation. //var_dump($obj); echo "1st drill:"."<br>"; echo $obj->getProperty(); //echo prop1 string (// Get the property value). $obj->setProperty('I am a new property value'."<br><br>"); echo $obj->getProperty(); // Read it out again to show the change. //Second Drill echo "second drill: "."<br>"; class class2 { public $obj2="I am the first variable from the second drill."; public function setProperty2($newval2) { $this->obj2=$newval2; } public function getProperty2($newval2) { return $this->obj2."<br>"; } } // Create two objects $obj = new class2; $obj2 = new class2;

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.00718.31
8.3.50.0110.00922.97
8.3.40.0130.00718.85
8.3.30.0110.00318.79
8.3.20.0070.00020.16
8.3.10.0040.00420.39
8.3.00.0040.00420.59
8.2.180.0070.01425.92
8.2.170.0040.01122.96
8.2.160.0160.00022.07
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0060.00821.05
8.2.120.0000.00726.35
8.2.110.0000.01019.03
8.2.100.0110.00017.84
8.2.90.0000.00819.05
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0050.00317.80
8.2.50.0030.00618.10
8.2.40.0020.00520.51
8.2.30.0040.00419.32
8.2.20.0050.00217.56
8.2.10.0030.00618.10
8.2.00.0060.00318.00
8.1.280.0030.01025.92
8.1.270.0080.00023.79
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0140.00723.83
8.1.230.0080.00419.54
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0000.00917.48
8.1.190.0080.00017.22
8.1.180.0050.00318.10
8.1.170.0000.00818.64
8.1.160.0000.00720.67
8.1.150.0000.00718.81
8.1.140.0030.00619.63
8.1.130.0080.00017.36
8.1.120.0040.00417.45
8.1.110.0040.00417.36
8.1.100.0040.00417.36
8.1.90.0040.00417.39
8.1.80.0040.00417.43
8.1.70.0040.00417.40
8.1.60.0030.00517.47
8.1.50.0030.00617.56
8.1.40.0060.00317.50
8.1.30.0030.00517.48
8.1.20.0070.00017.42
8.1.10.0000.00917.59
8.1.00.0040.00417.53
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.46
8.0.270.0050.00317.17
8.0.260.0000.00816.82
8.0.250.0030.00317.00
8.0.240.0060.00616.92
8.0.230.0030.00316.85
8.0.220.0000.00716.86
8.0.210.0030.00316.81
8.0.200.0060.00317.00
8.0.190.0030.00517.00
8.0.180.0040.00416.99
8.0.170.0000.00716.91
8.0.160.0050.00316.81
8.0.150.0040.00416.76
8.0.140.0040.00416.82
8.0.130.0050.00013.30
8.0.120.0080.00016.89
8.0.110.0050.00216.80
8.0.100.0070.00016.84
8.0.90.0070.00016.80
8.0.80.0030.01216.89
8.0.70.0080.00016.81
8.0.60.0040.00416.88
8.0.50.0030.00316.70
8.0.30.0040.01217.05
8.0.20.0100.00817.40
8.0.10.0070.00016.84
8.0.00.0110.00716.81
7.4.330.0020.00216.84
7.4.320.0000.00616.49
7.4.300.0060.00016.59
7.4.290.0000.00716.46
7.4.280.0040.00416.50
7.4.270.0000.00716.61
7.4.260.0080.00016.54
7.4.250.0040.00416.60
7.4.240.0030.00316.59
7.4.230.0070.00016.54
7.4.220.0030.01516.42
7.4.210.0050.01216.53
7.4.200.0070.00016.32
7.4.160.0120.00316.53
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0160.00616.38
7.4.120.0080.00916.52
7.4.110.0060.01616.62
7.4.100.0160.00316.57
7.4.90.0100.00716.46
7.4.80.0160.00319.39
7.4.70.0040.01116.57
7.4.60.0070.01516.59
7.4.50.0100.00516.47
7.4.40.0170.00016.57
7.4.30.0130.01016.42
7.4.10.0030.01514.90
7.4.00.0050.01114.98
7.3.330.0000.00513.30
7.3.320.0000.00913.13
7.3.310.0000.00716.29
7.3.300.0030.00316.31
7.3.290.0030.00316.30
7.3.280.0070.01116.31
7.3.270.0160.00317.40
7.3.260.0160.01016.30
7.3.240.0090.00816.37
7.3.230.0030.01416.45
7.3.210.0110.00616.63
7.3.200.0000.01916.49
7.3.190.0160.00016.57
7.3.180.0140.00316.55
7.3.170.0110.00616.41
7.3.160.0060.01016.53
7.3.130.0070.01114.91
7.3.120.0070.01014.76
7.3.110.0080.01014.88
7.3.100.0070.00814.84
7.3.90.0040.01114.60
7.3.80.0120.00514.81
7.3.70.0050.01014.72
7.3.60.0030.00914.88
7.3.50.0060.00514.71
7.3.40.0050.00814.81
7.3.30.0070.00714.71
7.3.20.0100.00316.51
7.3.10.0050.01016.58
7.3.00.0030.00716.48
7.2.330.0100.00716.52
7.2.320.0090.00916.73
7.2.310.0100.00716.56
7.2.300.0070.01016.30
7.2.290.0000.01616.78
7.2.260.0040.01414.98
7.2.250.0110.00714.99
7.2.240.0050.01215.10
7.2.230.0100.00315.06
7.2.220.0050.00915.17
7.2.210.0090.00614.97
7.2.200.0020.00815.01
7.2.190.0070.00415.01
7.2.180.0050.00715.24
7.2.170.0050.00914.95
7.2.160.0080.00315.28
7.2.150.0090.00916.95
7.2.140.0040.00816.95
7.2.130.0000.01316.84
7.2.120.0090.00616.87
7.2.110.0060.01316.47
7.2.100.0090.00316.84
7.2.90.0030.01017.17
7.2.80.0100.00316.72
7.2.70.0080.00416.95
7.2.60.0040.00516.66
7.2.50.0000.01316.55
7.2.40.0060.00617.21
7.2.30.0100.00716.67
7.2.20.0000.01516.56
7.2.10.0000.00917.05
7.2.00.0080.01118.24
7.1.330.0070.00715.76
7.1.320.0060.00515.88
7.1.310.0030.01215.86
7.1.300.0070.00615.51
7.1.290.0060.00815.86
7.1.280.0080.00815.78
7.1.270.0030.00815.83
7.1.260.0080.00515.72
7.1.250.0060.00615.78
7.1.240.0090.00915.80
7.1.230.0100.00315.45
7.1.220.0110.00015.71
7.1.210.0100.00315.86
7.1.200.0060.00815.63
7.1.190.0000.01315.82
7.1.180.0050.00515.83
7.1.170.0070.00715.80
7.1.160.0060.00615.67
7.1.150.0000.00915.67
7.1.140.0060.00315.80
7.1.130.0040.00715.74
7.1.120.0070.00315.77
7.1.110.0000.01615.58
7.1.100.0040.00916.85
7.1.90.0000.01215.46
7.1.80.0030.00715.77
7.1.70.0070.01016.34
7.1.60.0090.01017.61
7.1.50.0100.00816.27
7.1.40.0080.00415.88
7.1.30.0030.00915.87
7.1.20.0080.00015.55
7.1.10.0070.00315.77
7.1.00.0060.03618.87
7.0.330.0080.00415.27
7.0.320.0090.00015.43
7.0.310.0040.01115.58
7.0.300.0100.00315.47
7.0.290.0070.00715.45
7.0.280.0080.00415.28
7.0.270.0100.00615.21
7.0.260.0060.00615.39
7.0.250.0060.00315.56
7.0.240.0030.00915.61
7.0.230.0040.01115.41
7.0.220.0060.00615.13
7.0.210.0100.00715.22
7.0.200.0290.01115.00
7.0.190.0030.01015.37
7.0.180.0000.01115.28
7.0.170.0060.00615.33
7.0.160.0000.00815.28
7.0.150.0070.00715.35
7.0.140.0050.00815.28
7.0.130.0000.00815.19
7.0.120.0070.00715.57
7.0.110.0030.00815.20
7.0.100.0070.01015.33
7.0.90.0030.00915.35
7.0.80.0070.00315.32
7.0.70.0030.00915.41
7.0.60.0070.03818.39
7.0.50.0020.04416.70
7.0.40.0070.03116.82
7.0.30.0160.02016.84
7.0.20.0160.04016.88
7.0.10.0000.03016.73
7.0.00.0060.04916.84
5.6.400.0000.01114.64
5.6.390.0060.00614.18
5.6.380.0060.00914.34
5.6.370.0040.01414.32
5.6.360.0070.00314.56
5.6.350.0000.00814.66
5.6.340.0030.00814.56
5.6.330.0060.00614.64
5.6.320.0000.01014.40
5.6.310.0080.00414.57
5.6.300.0060.00814.21
5.6.290.0080.00314.66
5.6.280.0050.03117.56
5.6.270.0070.01014.13
5.6.260.0030.00614.53
5.6.250.0030.01114.53
5.6.240.0070.00414.55
5.6.230.0030.00714.26
5.6.220.0090.00614.75
5.6.210.0070.04317.42
5.6.200.0070.02216.27
5.6.190.0020.03817.52
5.6.180.0270.03217.43
5.6.170.0130.02317.59
5.6.160.0110.04117.41
5.6.150.0030.04616.30
5.6.140.0050.03616.35
5.6.130.0050.04516.39
5.6.120.0030.03617.61
5.6.110.0060.03317.63
5.6.100.0050.02717.84
5.6.90.0040.04617.71
5.6.80.0030.02517.27
5.6.70.0000.01314.22
5.6.60.0060.00914.09
5.6.50.0100.00314.23
5.6.40.0000.01714.37
5.6.30.0030.01014.08
5.6.20.0000.01014.33
5.6.10.0050.00514.19
5.6.00.0080.00414.27
5.5.380.0040.01114.23
5.5.370.0040.01214.23
5.5.360.0100.00314.37
5.5.350.1960.02617.33
5.5.340.0030.04516.13
5.5.330.0050.03417.42
5.5.320.0090.03617.26
5.5.310.0150.02517.24
5.5.300.0060.04516.16
5.5.290.0080.02716.19
5.5.280.0050.03617.52
5.5.270.0020.03217.57
5.5.260.0090.03217.53
5.5.250.0030.04717.42
5.5.240.0090.03417.26
5.5.230.0000.00814.00
5.5.220.0030.01014.26
5.5.210.0070.00713.99
5.5.200.0040.00814.39
5.5.190.0000.00813.96
5.5.180.0030.01214.05
5.5.170.0090.00414.44
5.5.160.0080.00614.20
5.5.150.0110.00314.33
5.5.140.0040.01114.49
5.5.130.0070.00714.43
5.5.120.0000.01414.12
5.5.110.0040.01114.39
5.5.100.0070.00714.21
5.5.90.0040.01114.13
5.5.80.0090.00014.19
5.5.70.0070.00713.75
5.5.60.0030.01014.00
5.5.50.0030.01013.85
5.5.40.0100.00313.95
5.5.30.0030.00713.93
5.5.20.0070.00714.36
5.5.10.0030.01014.02
5.5.00.0060.00714.21

preferences:
34.25 ms | 401 KiB | 5 Q