3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; private $b; public function __construct() { echo 'DA'; } public function getA() {return $this->a;} public function getB() {return $this->b;} public function setA($a) {$this->a = $a;} public function setB($b) {$this->b = $b;} } $class = new ReflectionClass('Foo'); $instance = $class->newInstanceWithoutConstructor(); var_dump($instance); $reflect = new ReflectionObject($instance); $properties = $reflect->getProperties(); $i = 0; foreach ($properties as $property) { $property->setAccessible(true); $property->setValue($instance, $i); $i++; } var_dump($instance);

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.01118.31
8.3.50.0100.01121.92
8.3.40.0120.00318.38
8.3.30.0100.00618.53
8.3.20.0060.00320.34
8.3.10.0090.00020.54
8.3.00.0040.00421.81
8.2.180.0110.00316.50
8.2.170.0090.00922.96
8.2.160.0110.00421.92
8.2.150.0030.00524.18
8.2.140.0140.00024.66
8.2.130.0080.00020.89
8.2.120.0080.00026.35
8.2.110.0110.00020.35
8.2.100.0070.00318.04
8.2.90.0000.00819.22
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0050.00318.09
8.2.40.0000.00820.52
8.2.30.0040.00419.34
8.2.20.0030.00517.70
8.2.10.0080.00018.06
8.2.00.0070.00018.10
8.1.280.0170.00325.92
8.1.270.0070.01122.14
8.1.260.0050.00328.09
8.1.250.0050.00328.09
8.1.240.0070.00322.24
8.1.230.0070.00417.76
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0000.00917.35
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0050.00318.59
8.1.160.0040.00420.83
8.1.150.0080.00018.79
8.1.140.0040.00419.52
8.1.130.0040.00417.72
8.1.120.0070.00017.48
8.1.110.0080.00017.50
8.1.100.0000.00817.41
8.1.90.0000.00817.40
8.1.80.0080.00017.31
8.1.70.0000.00817.32
8.1.60.0000.00917.59
8.1.50.0060.00317.59
8.1.40.0000.00817.42
8.1.30.0000.00817.59
8.1.20.0000.00817.55
8.1.10.0040.00417.48
8.1.00.0000.00817.38
8.0.300.0040.00418.77
8.0.290.0080.00016.58
8.0.280.0000.00718.46
8.0.270.0030.00317.32
8.0.260.0060.00017.40
8.0.250.0070.00017.00
8.0.240.0060.00017.05
8.0.230.0030.00316.96
8.0.220.0030.00316.93
8.0.210.0030.00316.92
8.0.200.0000.00616.93
8.0.190.0000.00716.93
8.0.180.0050.00216.83
8.0.170.0070.00016.84
8.0.160.0040.00416.88
8.0.150.0030.00316.88
8.0.140.0050.00216.73
8.0.130.0030.00313.37
8.0.120.0000.00716.77
8.0.110.0050.00316.84
8.0.100.0000.00716.70
8.0.90.0070.00016.91
8.0.80.0030.01316.93
8.0.70.0050.00216.96
8.0.60.0040.00416.77
8.0.50.0000.00716.79
8.0.30.0080.01017.01
8.0.20.0110.00817.40
8.0.10.0080.00017.11
8.0.00.0050.01416.83
7.4.330.0050.00016.83
7.4.320.0000.00716.61
7.4.300.0000.00716.66
7.4.290.0040.00416.58
7.4.280.0080.00016.65
7.4.270.0070.00016.48
7.4.260.0030.00516.50
7.4.250.0040.00416.48
7.4.240.0040.00416.58
7.4.230.0070.00016.72
7.4.220.0130.01316.56
7.4.210.0130.00316.63
7.4.200.0000.00716.37
7.4.160.0130.00316.48
7.4.150.0090.00917.40
7.4.140.0100.01117.86
7.4.130.0080.00916.47
7.4.120.0100.00816.54
7.4.110.0090.00916.51
7.4.100.0100.01316.46
7.4.90.0150.00316.54
7.4.80.0060.01219.39
7.4.70.0030.01416.49
7.4.60.0110.00616.54
7.4.50.0030.01016.52
7.4.40.0090.00916.59
7.4.30.0110.01216.35
7.4.00.0000.01715.23
7.3.330.0000.00613.27
7.3.320.0030.00313.32
7.3.310.0040.00416.17
7.3.300.0000.00716.36
7.3.290.0100.00816.31
7.3.280.0110.00916.31
7.3.270.0100.00717.40
7.3.260.0090.00916.34
7.3.250.0100.00916.44
7.3.240.0060.01416.52
7.3.230.0140.00316.39
7.3.210.0100.00716.24
7.3.200.0090.00916.29
7.3.190.0070.00716.64
7.3.180.0060.00916.32
7.3.170.0080.00916.48
7.3.160.0140.00316.33
7.3.120.0130.00714.88
7.3.110.0060.01214.70
7.3.100.0040.00814.87
7.3.90.0130.00614.81
7.3.80.0040.01414.70
7.3.70.0080.00414.82
7.3.60.0060.00914.82
7.3.50.0100.00714.77
7.3.40.0070.00714.66
7.3.30.0080.00414.80
7.3.20.0060.01016.61
7.3.10.0060.00616.67
7.3.00.0070.00416.50
7.2.330.0140.00916.66
7.2.320.0090.00916.79
7.2.310.0030.01316.51
7.2.300.0070.01016.65
7.2.290.0160.00616.68
7.2.240.0030.01615.29
7.2.230.0030.01415.04
7.2.220.0080.01114.79
7.2.210.0040.01115.20
7.2.200.0070.00715.19
7.2.190.0030.01114.66
7.2.180.0000.01215.03
7.2.170.0040.01115.09
7.2.160.0030.01314.99
7.2.150.0000.01417.16
7.2.140.0030.01216.91
7.2.130.0070.00716.85
7.2.120.0040.01116.93
7.2.110.0070.01017.01
7.2.100.0080.00417.10
7.2.90.0060.00916.77
7.2.80.0060.00616.97
7.2.70.0060.00617.03
7.2.60.0090.00316.70
7.2.50.0030.00616.81
7.2.40.0030.01016.92
7.2.30.0070.00716.92
7.2.20.0030.01016.98
7.2.10.0060.00917.05
7.2.00.0060.00917.02
7.1.330.0090.00915.62
7.1.320.0120.00315.95
7.1.310.0090.00315.71
7.1.300.0000.01715.78
7.1.290.0060.00615.50
7.1.280.0070.00715.82
7.1.270.0070.00715.75
7.1.260.0090.00015.77
7.1.250.0030.01215.74
7.1.100.0030.00518.06
7.1.70.0060.00317.23
7.1.60.0140.01119.19
7.1.50.0050.00516.86
7.1.00.0000.08022.43
7.0.200.0360.01214.75
7.0.60.0230.07021.74
7.0.50.0030.06717.72
7.0.40.0030.04320.14
7.0.30.0430.04720.30
7.0.20.0200.04020.33
7.0.10.0170.07720.17
7.0.00.0130.04320.25
5.6.280.0030.07320.92
5.6.210.0070.04020.54
5.6.200.0070.08018.21
5.6.190.0070.06020.41
5.6.180.0270.03720.66
5.6.170.0300.03320.39
5.6.160.0100.04720.43
5.6.150.0200.07318.17
5.6.140.0070.08018.19
5.6.130.0100.05018.27
5.6.120.0070.08021.00
5.6.110.0130.07021.05
5.6.100.0070.08320.99
5.6.90.0100.08320.99
5.6.80.0000.04020.36
5.5.350.0300.07720.43
5.5.340.0000.04717.99
5.5.330.0030.08720.19
5.5.320.0200.04320.27
5.5.310.0170.04020.29
5.5.300.0030.08318.05
5.5.290.0070.03717.95
5.5.280.0100.03720.99
5.5.270.0030.04720.80
5.5.260.0170.06720.87
5.5.250.0200.06320.47
5.5.240.0000.08020.38

preferences:
39.1 ms | 401 KiB | 5 Q