3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { 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 />"; } } // Create a new object $obj = new MyClass; // Output the object as a string echo $obj; // Destroy the object unset($obj); // Output a message at the end of the file echo "End of file.<br />"; ?>

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.0090.00616.63
8.3.50.0140.00721.92
8.3.40.0070.00718.67
8.3.30.0030.01419.12
8.3.20.0020.00520.25
8.3.10.0070.00323.70
8.3.00.0030.00719.02
8.2.180.0070.00718.41
8.2.170.0070.00722.96
8.2.160.0180.00020.47
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0110.00422.13
8.2.110.0030.00622.25
8.2.100.0030.00917.78
8.2.90.0050.00319.23
8.2.80.0090.00017.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0090.00019.88
8.2.30.0090.00018.32
8.2.20.0030.00617.61
8.2.10.0070.00017.97
8.2.00.0060.00317.51
8.1.280.0070.00725.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00024.02
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0000.00819.14
8.1.170.0060.00318.44
8.1.160.0040.00422.04
8.1.150.0030.00618.65
8.1.140.0020.00517.45
8.1.130.0050.00317.89
8.1.120.0060.00317.43
8.1.110.0050.00217.36
8.1.100.0080.00017.36
8.1.90.0080.00017.48
8.1.80.0000.00717.36
8.1.70.0060.00317.44
8.1.60.0000.00817.52
8.1.50.0030.00617.52
8.1.40.0120.00017.57
8.1.30.0000.01017.53
8.1.20.0040.00417.68
8.1.10.0000.00817.50
8.1.00.0000.00717.52
8.0.300.0020.00518.77
8.0.290.0000.00917.05
8.0.280.0000.00718.39
8.0.270.0030.00517.14
8.0.260.0030.00317.29
8.0.250.0000.00716.86
8.0.240.0060.00016.89
8.0.230.0040.00416.95
8.0.220.0040.00416.87
8.0.210.0030.00516.87
8.0.200.0000.00716.94
8.0.190.0040.00316.83
8.0.180.0030.00616.95
8.0.170.0040.00416.93
8.0.160.0030.00317.00
8.0.150.0030.00616.80
8.0.140.0000.00816.82
8.0.130.0060.00013.27
8.0.120.0030.00616.83
8.0.110.0000.00716.96
8.0.100.0000.00916.80
8.0.90.0040.00416.89
8.0.80.0060.01016.89
8.0.70.0000.00716.91
8.0.60.0000.00717.01
8.0.50.0000.00716.93
8.0.30.0110.00817.24
8.0.20.0100.00917.40
8.0.10.0040.00417.01
8.0.00.0120.00516.86
7.4.330.0050.00015.00
7.4.320.0070.00016.37
7.4.300.0060.00016.62
7.4.290.0070.00016.56
7.4.280.0090.00016.53
7.4.270.0030.00316.58
7.4.260.0030.00316.48
7.4.250.0000.00816.43
7.4.240.0020.00516.47
7.4.230.0040.00416.45
7.4.220.0140.00316.56
7.4.210.0070.00916.55
7.4.200.0000.00716.55
7.4.190.0030.00316.67
7.4.160.0190.00316.48
7.4.150.0110.00717.40
7.4.140.0110.00617.86
7.4.130.0090.01116.33
7.4.120.0070.01116.56
7.4.110.0040.01416.50
7.4.100.0040.01416.59
7.4.90.0070.01116.48
7.4.80.0150.00719.39
7.4.70.0070.01416.49
7.4.60.0070.01116.33
7.4.50.0000.00816.31
7.4.40.0120.00616.63
7.4.30.0030.01316.52
7.4.00.0100.00614.89
7.3.330.0050.00013.25
7.3.320.0050.00013.23
7.3.310.0000.00816.34
7.3.300.0000.00616.37
7.3.290.0070.00716.31
7.3.280.0070.00916.28
7.3.270.0080.00817.40
7.3.260.0090.00916.40
7.3.250.0120.00816.43
7.3.240.0140.00716.22
7.3.230.0000.01916.40
7.3.210.0170.00016.52
7.3.200.0110.00919.39
7.3.190.0070.01116.66
7.3.180.0080.00716.31
7.3.170.0070.00816.32
7.3.160.0040.01116.30
7.3.120.0120.00314.60
7.3.10.0040.00416.70
7.3.00.0030.00616.74
7.2.330.0230.00416.82
7.2.320.0100.00716.73
7.2.310.0080.00816.62
7.2.300.0080.01016.33
7.2.290.0050.01116.63
7.2.130.0060.00616.96
7.2.120.0040.00816.89
7.2.110.0030.01216.82
7.2.100.0070.00316.89
7.2.90.0060.00916.64
7.2.80.0090.00316.96
7.2.70.0090.00616.64
7.2.60.0060.00916.80
7.2.50.0070.01017.10
7.2.40.0070.01016.86
7.2.30.0090.00916.78
7.2.20.0060.01217.05
7.2.10.0100.00316.91
7.2.00.0050.01018.04
7.1.250.0030.00715.74
7.1.100.0060.00618.11
7.1.70.0000.00717.16
7.1.60.0100.01319.46
7.1.50.0090.01817.04
7.1.00.0030.07722.40
7.0.200.0000.00916.85
7.0.140.0000.07722.18
7.0.60.0070.03719.86
7.0.50.0100.03317.96
7.0.40.0030.05720.37
7.0.30.0530.07020.17
7.0.20.0170.05720.36
7.0.10.0100.08020.23
7.0.00.0200.06320.22
5.6.280.0100.06721.16
5.6.210.0100.07020.62
5.6.200.0030.04718.18
5.6.190.0130.07020.50
5.6.180.0130.04720.39
5.6.170.0230.04020.48
5.6.160.0100.06020.46
5.6.150.0070.04718.14
5.6.140.0070.05018.14
5.6.130.0030.08718.28
5.6.120.0130.06321.04
5.6.110.0000.04721.05
5.6.100.0100.05720.98
5.6.90.0000.07720.96
5.6.80.0100.07020.51
5.5.350.0130.07020.46
5.5.340.0130.07318.07
5.5.330.0030.04320.13
5.5.320.0400.05720.32
5.5.310.0270.07020.34
5.5.300.0030.08718.04
5.5.290.0030.04018.04
5.5.280.0070.08020.86
5.5.270.0070.04320.77
5.5.260.0070.07720.77
5.5.250.0070.06320.59
5.5.240.0230.07720.02
5.4.450.0130.04019.55
5.4.440.0300.06019.41
5.4.430.0170.05019.52
5.4.420.0230.07319.42
5.4.410.0300.06719.35
5.4.400.0200.08019.20
5.4.390.0230.04319.08
5.4.380.0230.07019.04
5.4.370.0330.06019.20
5.4.360.0300.07019.14
5.4.350.0270.07018.87
5.4.340.0270.07318.98
5.4.320.0200.05319.05
5.4.310.0230.07319.06
5.4.300.0200.03319.07
5.4.290.0370.06318.94
5.4.280.0200.04718.85
5.4.270.0300.07019.21
5.4.260.0400.05018.87
5.4.250.0270.06719.05
5.4.240.0200.05019.14
5.4.230.0270.06719.21
5.4.220.0370.06319.13
5.4.210.0430.05318.91
5.4.200.0300.07019.13
5.4.190.0270.07019.05
5.4.180.0230.07019.23
5.4.170.0170.06019.13
5.4.160.0300.06319.06
5.4.150.0270.06018.85
5.4.140.0230.06716.50
5.4.130.0200.05716.49
5.4.120.0370.05316.28
5.4.110.0170.05316.35
5.4.100.0170.07316.56
5.4.90.0230.07016.55
5.4.80.0200.07316.38
5.4.70.0270.06316.18
5.4.60.0270.06716.55
5.4.50.0270.06316.55
5.4.40.0270.05716.25
5.4.30.0230.07016.42
5.4.20.0170.05716.24
5.4.10.0200.07016.32
5.4.00.0270.06015.81
5.3.290.0300.06714.89
5.3.280.0270.04714.59
5.3.270.0370.05314.60
5.3.260.0300.05014.51
5.3.250.0230.06314.62
5.3.240.0130.08314.53
5.3.230.0230.07314.58
5.3.220.0300.05314.55
5.3.210.0200.05014.66
5.3.200.0300.07014.59
5.3.190.0170.08014.54
5.3.180.0230.04714.57
5.3.170.0230.07714.51
5.3.160.0200.04714.55
5.3.150.0270.05314.57
5.3.140.0230.07014.58
5.3.130.0300.06314.46
5.3.120.0230.05314.65
5.3.110.0230.07014.46
5.3.100.0230.07014.03
5.3.90.0270.05314.15
5.3.80.0230.06714.00
5.3.70.0430.05014.02
5.3.60.0200.07313.91
5.3.50.0200.07314.12
5.3.40.0330.06714.17
5.3.30.0330.06313.81
5.3.20.0270.06713.92
5.3.10.0270.06013.58
5.3.00.0230.06013.72
5.2.170.0130.06012.29
5.2.160.0200.03012.29
5.2.150.0200.05012.29
5.2.140.0170.04712.29
5.2.130.0170.04712.29
5.2.120.0170.05712.29
5.2.110.0200.07012.29
5.2.100.0200.04712.29
5.2.90.0200.05712.29
5.2.80.0230.05012.29
5.2.70.0200.04712.29
5.2.60.0100.05712.29
5.2.50.0170.05712.29
5.2.40.0200.05712.29
5.2.30.0230.04712.29
5.2.20.0170.05712.29
5.2.10.0100.03312.29
5.2.00.0200.04312.29
5.1.60.0300.04012.29
5.1.50.0170.04312.29
5.1.40.0170.05312.29
5.1.30.0170.06012.29
5.1.20.0170.04712.29
5.1.10.0170.05312.29
5.1.00.0170.05312.29
5.0.50.0100.04012.29
5.0.40.0100.04312.29
5.0.30.0100.05012.29
5.0.20.0130.03712.29
5.0.10.0100.03312.29
5.0.00.0070.05712.29
4.4.90.0070.03712.29
4.4.80.0070.03712.29
4.4.70.0130.02712.29
4.4.60.0000.02312.29
4.4.50.0100.03012.29
4.4.40.0100.04312.29
4.4.30.0130.01712.29
4.4.20.0100.03312.29
4.4.10.0070.03012.29
4.4.00.0100.05012.29
4.3.110.0070.03012.29
4.3.100.0100.01012.29
4.3.90.0100.02712.29
4.3.80.0130.03312.29
4.3.70.0100.02012.29
4.3.60.0130.02012.29
4.3.50.0100.02012.29
4.3.40.0070.03012.29
4.3.30.0070.02012.29
4.3.20.0030.03712.29
4.3.10.0000.03312.29
4.3.00.0070.03312.29

preferences:
40.24 ms | 401 KiB | 5 Q