3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'hello there world!'; echo 'The date is... who cares?'; $thingy = new Thingy(); $thingy->setArray(['tit' => 'eh']); $thingy->displayIfIndexExists('tit'); class Thingy { private $array; // or in __construct(), also get public function setArray(Array $array) { $this->array = $array; } public function displayIfIndexExists($tit) { if (array_key_exists($tit, $this->array)) { echo $this->array[$tit]; } } public function getIndexIfExists($tit) { return (array_key_exists($tit, $this->array)) ? ($this->array[$tit]) : false; } } ?>

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.01418.39
8.3.50.0070.00718.05
8.3.40.0120.00318.83
8.3.30.0110.00419.19
8.3.20.0040.00420.34
8.3.10.0000.00821.79
8.3.00.0080.00022.47
8.2.180.0070.01016.37
8.2.170.0110.00422.96
8.2.160.0110.00418.98
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00419.36
8.2.110.0070.00322.26
8.2.100.0070.00419.57
8.2.90.0000.00819.39
8.2.80.0040.00418.05
8.2.70.0080.00017.50
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0000.00818.28
8.2.30.0040.00418.01
8.2.20.0000.00717.60
8.2.10.0040.00419.43
8.2.00.0040.00417.67
8.1.270.0030.00522.14
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.00823.96
8.1.230.0110.00019.01
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0040.00417.36
8.1.190.0040.00417.30
8.1.180.0080.00018.60
8.1.170.0030.00618.59
8.1.160.0080.00021.88
8.1.150.0000.00718.50
8.1.140.0040.00417.31
8.1.130.0040.00417.73
8.1.120.0000.00717.44
8.1.110.0000.00817.38
8.1.100.0000.00717.46
8.1.90.0050.00217.31
8.1.80.0000.00717.40
8.1.70.0030.00317.38
8.1.60.0040.00417.60
8.1.50.0000.00717.54
8.1.40.0020.00517.42
8.1.30.0030.00617.61
8.1.20.0040.00417.70
8.1.10.0040.00417.58
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0050.00217.05
8.0.280.0070.00018.37
8.0.270.0030.00317.26
8.0.260.0000.00816.83
8.0.250.0000.00717.02
8.0.240.0000.00716.95
8.0.230.0020.00516.91
8.0.220.0000.00716.78
8.0.210.0030.00316.83
8.0.200.0000.00716.88
8.0.190.0000.00916.80
8.0.180.0000.00716.89
8.0.170.0050.00316.92
8.0.160.0000.00816.65
8.0.150.0040.00416.61
8.0.140.0000.00816.73
8.0.130.0080.00013.27
8.0.120.0050.00316.69
8.0.110.0040.00416.89
8.0.100.0000.00716.88
8.0.90.0030.00516.64
8.0.80.0120.00916.79
8.0.70.0040.00416.62
8.0.60.0070.00016.80
8.0.50.0050.00216.87
8.0.30.0130.00817.25
8.0.20.0110.00717.42
8.0.10.0080.00016.98
8.0.00.0090.01016.85
7.4.330.0000.00515.03
7.4.320.0000.00616.62
7.4.300.0060.00016.61
7.4.290.0070.00016.57
7.4.280.0030.00316.43
7.4.270.0070.00016.62
7.4.260.0070.00016.62
7.4.250.0040.00416.55
7.4.240.0040.00416.51
7.4.230.0040.00416.39
7.4.220.0170.00316.59
7.4.210.0080.00916.57
7.4.200.0040.00416.35
7.4.190.0000.00716.77
7.4.160.0000.01516.59
7.4.150.0140.00317.40
7.4.140.0090.00817.86
7.4.130.0080.00916.60
7.4.120.0080.01016.56
7.4.110.0140.00316.49
7.4.100.0070.01416.60
7.4.90.0130.01016.38
7.4.80.0130.00519.39
7.4.70.0070.01416.50
7.4.60.0100.00616.47
7.4.50.0000.00516.45
7.4.40.0130.00622.77
7.4.30.0090.00616.45
7.4.00.0030.01114.90
7.3.330.0020.00213.32
7.3.320.0000.00513.14
7.3.310.0030.00316.33
7.3.300.0000.00716.34
7.3.290.0160.00316.23
7.3.280.0090.00816.32
7.3.270.0100.00717.40
7.3.260.0120.00416.41
7.3.250.0060.01316.31
7.3.240.0090.00916.25
7.3.230.0080.00816.39
7.3.210.0140.00316.41
7.3.200.0090.00619.39
7.3.190.0170.00316.37
7.3.180.0080.00816.41
7.3.170.0030.01716.35
7.3.160.0120.00316.51
7.3.120.0060.00614.83
7.3.10.0040.01216.36
7.3.00.0080.00416.75
7.2.330.0040.01316.69
7.2.320.0140.00716.47
7.2.310.0140.00316.42
7.2.300.0130.00316.75
7.2.290.0080.00816.66
7.2.130.0030.00716.87
7.2.120.0100.00316.64
7.2.110.0040.00816.61
7.2.100.0070.00716.73
7.2.90.0130.00316.74
7.2.80.0000.01317.11
7.2.70.0070.01017.00
7.2.60.0030.01116.86
7.2.50.0060.00616.84
7.2.40.0080.00516.82
7.2.30.0150.00316.87
7.2.20.0080.00817.05
7.2.10.0130.00617.05
7.2.00.0030.00818.30
7.1.250.0040.00415.87
7.1.200.0060.00615.91
7.1.100.0090.00918.13
7.1.70.0050.00317.20
7.1.60.0000.02419.82
7.1.50.0100.01317.12
7.1.00.0130.07022.43
7.0.200.0030.00316.73
7.0.140.0030.07322.08
7.0.60.0030.07320.04
7.0.50.0070.04317.99
7.0.40.0000.06020.21
7.0.30.0330.07720.07
7.0.20.0330.04320.16
7.0.10.0330.07020.26
7.0.00.0070.08020.14
5.6.280.0070.07020.90
5.6.210.0030.06320.62
5.6.200.0130.04318.16
5.6.190.0030.04320.39
5.6.180.5070.03320.48
5.6.170.0300.05320.47
5.6.160.0100.07320.45
5.6.150.0030.08018.19
5.6.140.0000.04318.14
5.6.130.0030.04018.14
5.6.120.0000.04320.90
5.6.110.0030.08021.14
5.6.100.0100.08321.03
5.6.90.0070.07320.98
5.6.80.0200.06720.44
5.5.350.0000.08720.43
5.5.340.0030.04017.98
5.5.330.0100.04720.40
5.5.320.0270.07720.32
5.5.310.0170.04020.26
5.5.300.0170.05017.95
5.5.290.0000.06018.06
5.5.280.0130.04020.88
5.5.270.0170.06020.87
5.5.260.0000.08320.95
5.5.250.0070.08720.77
5.5.240.0070.03720.27
5.4.450.0130.05019.17
5.4.440.0430.05719.16
5.4.430.0200.04319.21
5.4.420.0170.05019.36
5.4.410.0170.07019.40
5.4.400.0970.00018.67
5.4.390.1000.00018.57
5.4.380.0170.06718.54
5.4.370.1030.05718.81
5.4.360.1170.05018.63
5.4.350.1070.05318.84
5.4.340.1100.04318.50
5.4.320.0020.04012.50
5.4.310.0080.04112.50
5.4.300.0110.04112.50
5.4.290.0060.04312.50
5.4.280.0050.04012.39
5.4.270.0170.06318.71
5.4.260.0130.05018.89
5.4.250.0000.05718.71
5.4.240.0130.06018.72
5.4.230.0100.06018.75
5.4.220.0130.07018.75
5.4.210.0070.07719.04
5.4.200.0100.05018.89
5.4.190.0030.08018.90
5.4.180.0100.05019.00
5.4.170.0070.06018.89
5.4.160.0030.05718.77
5.4.150.0200.06718.90
5.4.140.0100.05016.39
5.4.130.0000.05716.60
5.4.120.0030.05716.30
5.4.110.0070.06716.46
5.4.100.0070.04716.44
5.4.90.0200.05316.48
5.4.80.0100.04316.42
5.4.70.0070.05016.46
5.4.60.0100.07016.34
5.4.50.0100.06716.57
5.4.40.0130.05316.50
5.4.30.0070.05716.49
5.4.20.0000.05716.48
5.4.10.0100.05016.44
5.4.00.0100.05015.98
5.3.290.0110.05112.80
5.3.280.0000.06014.46
5.3.270.0100.05014.46
5.3.260.0070.05314.44
5.3.250.0070.05014.62
5.3.240.0030.05714.38
5.3.230.0070.05314.37
5.3.220.0070.05014.66
5.3.210.0170.06314.59
5.3.200.0070.05314.41
5.3.190.0100.05314.57
5.3.180.0200.05314.60
5.3.170.0070.05314.45
5.3.160.0030.05714.59
5.3.150.0070.06714.26
5.3.140.0130.05314.39
5.3.130.0030.06014.57
5.3.120.0170.06714.44
5.3.110.0030.05714.38
5.3.100.0100.05313.89
5.3.90.0070.05014.04
5.3.80.0070.05313.94
5.3.70.0070.05313.80
5.3.60.0030.05313.70
5.3.50.0030.06014.05
5.3.40.0030.05013.84
5.3.30.0030.07313.86
5.3.20.0070.06013.61
5.3.10.0030.05713.52
5.3.00.0130.05313.65
5.2.170.0030.05010.90
5.2.160.0030.04311.06
5.2.150.0070.05710.97
5.2.140.0100.03711.14
5.2.130.0030.04011.00
5.2.120.0070.04011.19
5.2.110.0070.03711.01
5.2.100.0100.05010.86
5.2.90.0070.03711.21
5.2.80.0030.04311.20
5.2.70.0030.04311.18
5.2.60.0030.04711.16
5.2.50.0100.05310.86
5.2.40.0100.03710.93
5.2.30.0130.03310.91
5.2.20.0100.03710.71
5.2.10.0130.03010.75
5.2.00.0130.03010.55
5.1.60.0030.0339.77
5.1.50.0000.0409.94
5.1.40.0030.04310.21
5.1.30.0100.04010.33
5.1.20.0130.04010.43
5.1.10.0100.03010.03
5.1.00.0130.04010.11
5.0.50.0030.0338.60
5.0.40.0030.0408.27
5.0.30.0000.0508.27
5.0.20.0030.0278.25
5.0.10.0070.0278.20
5.0.00.0100.0338.07
4.4.90.0070.0276.64
4.4.80.0000.0236.64
4.4.70.0030.0206.64
4.4.60.0070.0236.64
4.4.50.0070.0176.64
4.4.40.0000.0406.64
4.4.30.0070.0176.64
4.4.20.0030.0276.64
4.4.10.0030.0206.64
4.4.00.0000.0336.64
4.3.110.0000.0276.64
4.3.100.0000.0236.64
4.3.90.0030.0236.64
4.3.80.0000.0476.64
4.3.70.0000.0306.64
4.3.60.0000.0206.64
4.3.50.0030.0206.64
4.3.40.0000.0336.64
4.3.30.0070.0236.64
4.3.20.0030.0276.64
4.3.10.0000.0236.64
4.3.00.0130.0207.29

preferences:
65.83 ms | 400 KiB | 5 Q