3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { private $myData = [ 'test1' => 'a value!', 'test2' => null, ]; public function __get($name) { if (!array_key_exists($name, $this->myData)) { echo "oops, $name does not exist"; return null; } return $this->myData[$name]; } public function __isset($name) { return isset($this->myData[$name]); } } $s = new SomeClass; // this is fine, we try reading stuff and in last case, it's "not possible" echo "test1 is $s->test1"; echo "test2 is $s->test2"; echo "testX is $s->testX"; // let's check if our properties exist echo 'test1 ' . (isset($s->test1) ? 'is set' : 'is not set') . PHP_EOL; echo 'test2 ' . (isset($s->test2) ? 'is set' : 'is not set') . ' (but that\'s ok)' . PHP_EOL; echo 'testX ' . (isset($s->testX) ? 'is set' : 'is not set') . ' (but that\'s also ok)' . PHP_EOL; echo 'test2 ' . (property_exists($s, 'test2') ? 'exists' : 'is not there') . ' (yeah, strictly speaking)' . PHP_EOL; echo 'testX ' . (property_exists($s, 'testX') ? 'exists' : 'is not there') . ' (ok... so how do I know it\'s really not there?)' . PHP_EOL;

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.5.30.0110.00719.32
8.5.20.0100.01019.36
8.5.10.0090.00918.39
8.5.00.0120.01020.16
8.4.180.0130.00919.55
8.4.170.0100.01220.28
8.4.160.0140.00923.85
8.4.150.0080.00516.80
8.4.140.0150.00817.49
8.4.130.0130.00717.75
8.4.120.0070.00620.45
8.4.110.0130.00720.40
8.4.100.0130.00817.90
8.4.90.0130.00718.86
8.4.80.0120.00517.89
8.4.70.0090.01319.37
8.4.60.0130.00718.74
8.4.50.0090.01122.35
8.4.40.0100.01017.66
8.4.30.0120.00317.76
8.4.20.0060.01019.75
8.4.10.0060.00317.74
8.3.300.0130.00720.82
8.3.290.0110.00518.53
8.3.280.0060.00616.31
8.3.270.0120.00816.71
8.3.260.0150.00416.64
8.3.250.0100.00819.06
8.3.240.0130.00716.68
8.3.230.0150.00616.68
8.3.220.0030.00417.37
8.3.210.0130.00316.68
8.3.200.0050.00416.54
8.3.190.0130.00517.22
8.3.180.0030.00618.43
8.3.170.0030.00619.01
8.3.160.0050.00320.09
8.3.150.0100.01018.39
8.3.140.0060.00317.20
8.3.130.0040.00418.54
8.3.120.0060.00320.58
8.3.110.0090.00618.30
8.3.100.0060.00316.50
8.3.90.0120.00626.77
8.3.80.0030.00618.43
8.3.70.0170.00316.50
8.3.60.0030.01216.50
8.3.50.0100.00616.49
8.3.40.0060.00918.71
8.3.30.0120.00418.70
8.3.20.0040.00421.76
8.3.10.0040.00423.68
8.3.00.0040.00419.67
8.2.300.0110.00918.04
8.2.290.0110.00720.18
8.2.280.0060.00418.26
8.2.270.0160.00318.93
8.2.260.0060.00316.44
8.2.250.0120.00616.95
8.2.240.0090.00016.61
8.2.230.0080.00320.94
8.2.220.0060.00624.06
8.2.210.0080.00826.77
8.2.200.0040.00918.54
8.2.190.0140.00718.54
8.2.180.0130.00918.41
8.2.170.0070.00722.96
8.2.160.0070.00722.25
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0080.00021.05
8.2.110.0070.00321.05
8.2.100.0090.00317.97
8.2.90.0040.00418.02
8.2.80.0030.00518.28
8.2.70.0050.00317.93
8.2.60.0090.00017.75
8.2.50.0040.00418.16
8.2.40.0050.00322.36
8.2.30.0070.00019.63
8.2.20.0000.00718.15
8.2.10.0030.00617.82
8.2.00.0040.00418.16
8.1.340.0090.01218.36
8.1.330.0120.00723.54
8.1.320.0140.00518.02
8.1.310.0050.00318.50
8.1.300.0070.01117.74
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0000.00823.82
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01022.50
8.1.230.0030.00922.66
8.1.220.0000.00817.74
8.1.210.0070.00518.77
8.1.200.0080.00017.48
8.1.190.0060.00317.35
8.1.180.0050.00318.10
8.1.170.0030.00518.46
8.1.160.0040.00418.91
8.1.150.0080.00018.91
8.1.140.0050.00217.60
8.1.130.0030.00318.95
8.1.120.0000.00717.48
8.1.110.0040.00417.51
8.1.100.0100.00017.48
8.1.90.0040.00417.53
8.1.80.0030.00617.37
8.1.70.0040.00417.46
8.1.60.0030.00617.59
8.1.50.0030.00617.47
8.1.40.0020.00517.44
8.1.30.0000.00817.57
8.1.20.0040.00417.66
8.1.10.0050.00317.55
8.1.00.0000.00817.56
8.0.300.0040.00419.86
8.0.290.0070.00016.63
8.0.280.0040.00418.39
8.0.270.0030.00317.20
8.0.260.0000.00716.80
8.0.250.0090.00017.00
8.0.240.0040.00417.05
8.0.230.0040.00416.91
8.0.220.0000.00716.96
8.0.210.0000.00716.93
8.0.200.0060.00016.99
8.0.190.0070.00316.78
8.0.180.0000.00816.98
8.0.170.0050.00316.93
8.0.160.0000.00716.85
8.0.150.0000.00716.90
8.0.140.0030.00316.89
8.0.130.0000.00513.32
8.0.120.0040.00416.88
8.0.110.0000.00816.74
8.0.100.0080.00016.73
8.0.90.0070.00016.78
8.0.80.0150.00016.88
8.0.70.0000.00716.89
8.0.60.0000.00816.98
8.0.50.0030.00516.79
8.0.30.0160.00217.04
8.0.20.0060.01217.40
8.0.10.0080.00016.93
8.0.00.0150.00616.70
7.4.330.0060.00015.55
7.4.320.0060.00016.59
7.4.300.0030.00316.54
7.4.290.0040.00416.60
7.4.280.0030.00616.62
7.4.270.0000.00716.48
7.4.260.0030.00516.45
7.4.250.0070.00016.51
7.4.240.0050.00316.55
7.4.230.0030.00316.27
7.4.220.0070.00016.70
7.4.210.0100.00616.53
7.4.200.0020.00516.42
7.4.160.0120.00516.58
7.4.140.0100.00917.86
7.4.130.0330.01516.12
7.4.120.0060.01516.62
7.4.110.0070.01016.57
7.4.100.0100.00716.43
7.4.90.0120.00616.47
7.4.80.0110.00819.39
7.4.70.0100.00716.56
7.4.60.0090.00616.59
7.4.50.0030.01316.45
7.4.40.0070.01416.60
7.4.10.0040.01414.82
7.4.00.0090.00614.83
7.3.330.0050.00013.20
7.3.320.0000.00513.22
7.3.310.0050.00516.43
7.3.300.0070.00016.43
7.3.290.0030.00316.40
7.3.280.0070.00716.40
7.3.260.0110.00716.43
7.3.240.0080.00916.43
7.3.230.0030.01316.55
7.3.210.0060.01516.59
7.3.200.0120.00916.61
7.3.190.0170.00016.37
7.3.180.0130.00316.27
7.3.170.0060.01016.33
7.3.160.0060.00916.56
7.3.130.0070.01314.62
7.3.120.0090.00914.84
7.3.110.0090.00915.07
7.3.100.0130.00014.67
7.3.90.0070.00714.78
7.3.80.0090.00614.68
7.3.70.0000.01114.82
7.3.60.0030.00914.73
7.3.50.0000.00814.68
7.3.40.0030.01014.66
7.3.30.0030.00715.01
7.3.20.0060.00916.41
7.3.10.0070.00916.71
7.3.00.0070.00816.62
7.2.330.0030.01516.82
7.2.320.0100.01316.89
7.2.310.0070.01016.46
7.2.300.0110.00616.43
7.2.290.0120.01216.81
7.2.260.0040.00815.27
7.2.250.0070.01015.32
7.2.240.0090.00615.20
7.2.230.0080.00515.16
7.2.220.0100.00615.28
7.2.210.0090.00614.79
7.2.200.0030.00715.20
7.2.190.0140.00314.86
7.2.180.0070.01015.06
7.2.170.0110.00714.91
7.2.160.0060.00315.15
7.2.150.0060.00916.89
7.2.140.0030.00916.94
7.2.130.0070.00916.75
7.2.120.0100.00516.99
7.2.110.0080.00616.93
7.2.100.0060.00716.95
7.2.90.0070.00816.95
7.2.80.0050.00816.80
7.2.70.0050.00517.00
7.2.60.0040.01116.91
7.2.50.0070.00716.81
7.2.40.0070.00716.90
7.2.30.0090.00917.59
7.2.20.0060.01017.30
7.2.10.0270.00917.22
7.2.00.0070.01117.30
7.1.330.0100.00316.01
7.1.320.0030.00615.75
7.1.310.0100.00315.85
7.1.300.0110.00315.71
7.1.290.0060.00915.93
7.1.280.0100.00316.04
7.1.270.0030.01015.97
7.1.260.0070.01015.83
7.1.250.0030.01015.86
7.1.240.0040.01015.99
7.1.230.0040.00415.93
7.1.220.0000.00915.74
7.1.210.0000.01015.78
7.1.200.0050.00615.57
7.1.190.0000.00915.86
7.1.180.0070.00315.77
7.1.170.0060.00315.78
7.1.160.0030.00915.84
7.1.150.0110.00916.36
7.1.140.0090.00816.32
7.1.130.0130.00616.21
7.1.120.0110.01016.22
7.1.110.0060.01215.83
7.1.100.0070.01016.06
7.1.90.0120.01116.01
7.1.80.0080.00916.02
7.1.70.0070.00715.43
7.1.60.0180.00924.60
7.1.50.0300.00724.31
7.1.40.0210.00624.26
7.1.30.0200.01024.26
7.1.20.0170.01224.23
7.1.10.0060.01215.33
7.1.00.0080.00915.32
7.0.330.0000.01315.57
7.0.320.0030.01015.36
7.0.310.0040.00815.39
7.0.300.0060.00315.10
7.0.290.0000.01715.36
7.0.280.0080.00315.18
7.0.270.0070.00715.39
7.0.260.0060.00615.27
7.0.250.0030.00915.27
7.0.240.0040.00415.11
7.0.230.0070.00715.40
7.0.220.0060.00615.29
7.0.210.0080.00515.45
7.0.200.0000.01715.31
7.0.190.0090.00015.43
7.0.180.0030.01015.54
7.0.170.0050.00515.33
7.0.160.0040.00715.47
7.0.150.0030.00815.46
7.0.140.0090.00315.57
7.0.130.0030.01015.48
7.0.120.0040.00415.68
7.0.110.0060.00915.35
7.0.100.0030.00515.54
7.0.90.0060.00315.32
7.0.80.0070.00315.36
7.0.70.0070.00715.26
7.0.60.0070.00415.36
7.0.50.0100.00315.49
7.0.40.0000.00913.58
7.0.30.0050.00813.23
7.0.20.0000.01613.48
7.0.10.0050.00513.59
7.0.00.0060.00613.42
5.6.400.0040.00814.25
5.6.390.0040.01114.05
5.6.380.0100.00614.55
5.6.370.0150.00014.37
5.6.360.0050.00514.45
5.6.350.0080.00014.53
5.6.340.0060.00614.16
5.6.330.0090.00614.15
5.6.320.0140.00014.62
5.6.310.0040.00414.77
5.6.300.0140.00014.40
5.6.290.0000.01214.26
5.6.280.0120.00614.73
5.6.270.0100.00014.51
5.6.260.0070.00714.55
5.6.250.0050.00514.46
5.6.240.0100.00314.73
5.6.230.0060.00614.31
5.6.220.0040.00714.40
5.6.210.0090.00314.29
5.6.200.0030.01014.56
5.6.190.0070.00714.38
5.6.180.0030.00714.41
5.6.170.0030.00714.53
5.6.160.0040.00814.16
5.6.150.0100.00714.47
5.6.140.0040.00814.40
5.6.130.0000.01314.54
5.6.120.0070.00414.34
5.6.110.0030.01314.65
5.6.100.0060.00314.20
5.6.90.0100.00014.32
5.6.80.0000.00814.07
5.6.70.0000.01414.25
5.6.60.0070.00714.42
5.6.50.0060.00914.43
5.6.40.0040.01514.30
5.6.30.0040.01114.43
5.6.20.0070.01014.39
5.6.10.0070.00714.15
5.6.00.0070.01014.30

preferences:
52.21 ms | 2030 KiB | 5 Q