3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('exists' => 'foo'); if (isset($arr['exists']['non_existent'])) { echo "expected: sub-key 'non_existent' is set: "; var_dump($arr['exists']['non_existent']); } else { echo "BEHAVIOR CHANGED: sub-key 'non_existent' is not set.\n"; } if (isset($arr['exists'][1])) { echo "expected: sub-key 1 is set: "; var_dump($arr['exists'][1]); } else { echo "BEHAVIOR CHANGED: sub-key 1 is not set.\n"; } echo "-------------------\n"; if (isset($arr['exists']['non_existent']['sub_sub'])) { echo "BEHAVIOR CHANGED: sub-key 'sub_sub' is set: "; var_dump($arr['exists']['non_existent']['sub_sub']); } else { echo "good: sub-sub-key 'sub_sub' is not set.\n"; } if (isset($arr['exists'][1][0])) { echo "BEHAVIOR CHANGED: sub-sub-key 0 is set: "; var_dump($arr['exists'][1][0]); } else { echo "good: sub-sub-key 0 is not set.\n"; } echo "-------------------\n"; if (empty($arr['exists']['non_existent'])) { echo "BEHAVIOR CHANGED: sub-key 'non_existent' is empty.\n"; } else { echo "expected: sub-key 'non_existent' is not empty: "; var_dump($arr['exists']['non_existent']); } if (empty($arr['exists'][1])) { echo "BEHAVIOR CHANGED: sub-key 1 is empty.\n"; } else { echo "expected: sub-key 1 is NOT empty: "; var_dump($arr['exists'][1]); } echo "-------------------\n"; if (empty($arr['exists']['non_existent']['sub_sub'])) { echo "good: sub-sub-key 'sub_sub' is empty.\n"; } else { echo "BEHAVIOR CHANGED: sub-sub-key 'sub_sub' is not empty: "; var_dump($arr['exists']['non_existent']['sub_sub']); } if (empty($arr['exists'][1][0])) { echo "good: sub-sub-key 0 is empty.\n"; } else { echo "BEHAVIOR CHANGED: sub-sub-key 0 is not empty: "; var_dump($arr['exists'][1][0]); }

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.0040.01118.55
8.3.50.0100.00822.05
8.3.40.0160.00318.86
8.3.30.0070.00718.89
8.3.20.0040.00418.60
8.3.10.0040.00421.17
8.3.00.0040.00423.66
8.2.180.0240.00616.38
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.18
8.2.110.0090.00019.31
8.2.100.0040.00817.95
8.2.90.0040.00419.40
8.2.80.0040.00417.97
8.2.70.0030.00917.50
8.2.60.0030.00518.04
8.2.50.0060.00318.10
8.2.40.0030.00918.27
8.2.30.0000.00819.85
8.2.20.0070.00017.60
8.2.10.0030.00517.68
8.2.00.0060.00317.70
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.01119.52
8.1.230.0000.01117.70
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00717.23
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0050.00318.84
8.1.160.0000.00818.76
8.1.150.0080.00018.52
8.1.140.0030.00517.41
8.1.130.0000.00717.46
8.1.120.0000.00717.34
8.1.110.0050.00317.32
8.1.100.0000.00717.42
8.1.90.0000.00717.34
8.1.80.0040.00417.45
8.1.70.0030.00317.44
8.1.60.0000.00817.51
8.1.50.0040.00417.32
8.1.40.0000.00817.41
8.1.30.0040.00417.63
8.1.20.0040.00417.51
8.1.10.0000.00717.60
8.1.00.0040.00717.39
8.0.300.0090.00018.77
8.0.290.0050.00316.75
8.0.280.0000.00718.37
8.0.270.0030.00317.33
8.0.260.0070.00016.72
8.0.250.0000.00716.88
8.0.240.0030.00616.90
8.0.230.0070.00016.96
8.0.220.0070.00016.93
8.0.210.0030.00316.76
8.0.200.0070.00016.80
8.0.190.0030.00316.92
8.0.180.0070.00416.76
8.0.170.0070.00016.77
8.0.160.0050.00316.88
8.0.150.0000.00816.73
8.0.140.0000.00716.75
8.0.130.0000.00613.24
8.0.120.0040.00416.73
8.0.110.0030.00316.74
8.0.100.0080.00016.96
8.0.90.0000.00716.74
8.0.80.0060.00916.92
8.0.70.0080.00016.81
8.0.60.0050.00216.81
8.0.50.0000.00716.91
8.0.30.0090.01017.26
8.0.20.0060.01217.40
8.0.10.0070.00016.88
8.0.00.0070.01316.76
7.4.330.0000.00614.77
7.4.320.0060.00016.55
7.4.300.0000.00616.60
7.4.290.0030.00616.46
7.4.280.0000.00716.57
7.4.270.0030.00316.41
7.4.260.0000.00513.32
7.4.250.0040.00416.56
7.4.240.0030.00316.57
7.4.230.0020.00516.46
7.4.220.0030.01216.61
7.4.210.0080.00916.54
7.4.200.0070.00016.47
7.4.190.0000.00716.64
7.4.160.0130.00916.36
7.4.150.0120.00817.40
7.4.140.0070.01017.86
7.4.130.0070.01116.60
7.4.120.0100.00716.53
7.4.110.0080.00816.53
7.4.100.0130.00316.53
7.4.90.0080.01116.70
7.4.80.0070.01119.37
7.4.70.0120.01016.59
7.4.60.0040.01216.39
7.4.50.0030.00616.09
7.4.40.0060.00922.27
7.4.30.0090.00616.50
7.4.10.0070.01114.82
7.4.00.0080.01014.88
7.3.330.0000.00513.13
7.3.320.0020.00313.27
7.3.310.0040.00416.17
7.3.300.0000.00716.30
7.3.290.0110.00816.35
7.3.280.0090.00816.36
7.3.270.0090.00917.40
7.3.260.0110.00818.24
7.3.250.0120.00816.25
7.3.240.0060.01116.59
7.3.230.0070.01016.39
7.3.210.0110.01116.48
7.3.200.0120.01119.39
7.3.190.0160.00016.26
7.3.180.0100.00616.20
7.3.170.0110.00516.39
7.3.160.0080.00816.36
7.3.130.0090.00315.05
7.3.120.0090.00714.95
7.3.110.0180.00014.71
7.3.100.0040.00814.52
7.3.90.0070.00314.76
7.3.80.0000.00914.84
7.3.70.0090.00614.98
7.3.60.0040.00814.79
7.3.50.0060.00914.69
7.3.40.0030.00614.73
7.3.30.0070.00714.54
7.3.20.0060.00316.53
7.3.10.0060.00616.71
7.3.00.0080.00616.54
7.2.330.0140.00416.64
7.2.320.0080.01216.59
7.2.310.0080.01116.69
7.2.300.0110.00816.34
7.2.290.0110.00516.38
7.2.260.0000.01615.05
7.2.250.0030.01614.61
7.2.240.0120.00315.01
7.2.230.0070.00714.85
7.2.220.0090.00614.99
7.2.210.0050.00515.13
7.2.200.0030.00915.06
7.2.190.0000.01415.07
7.2.180.0030.00914.94
7.2.170.0040.00915.12
7.2.160.0040.01114.77
7.2.150.0100.00716.86
7.2.140.0000.01316.57
7.2.130.0050.00916.77
7.2.120.0050.00916.79
7.2.110.0070.00716.83
7.2.100.0060.00616.85
7.2.90.0030.01016.91
7.2.80.0070.01016.92
7.2.70.0050.00716.82
7.2.60.0020.01016.81
7.2.50.0060.00816.87
7.2.40.0030.01016.81
7.2.30.0040.01016.87
7.2.20.0070.00816.87
7.2.10.0050.01016.88
7.2.00.0060.00617.20
7.1.330.0100.00715.86
7.1.320.0100.00715.79
7.1.310.0070.00715.70
7.1.300.0000.00915.78
7.1.290.0100.00015.58
7.1.280.0090.00315.80
7.1.270.0090.00315.59
7.1.260.0080.00015.76
7.1.250.0020.01115.64
7.1.240.0030.00915.83
7.1.230.0100.00615.77
7.1.220.0000.01115.89
7.1.210.0030.01315.90
7.1.200.0080.00615.36
7.1.190.0040.01115.66
7.1.180.0000.00915.94
7.1.170.0030.00915.59
7.1.160.0100.00715.40
7.1.150.0070.00715.84
7.1.140.0100.00315.83
7.1.130.0040.01115.78
7.1.120.0100.00615.78
7.1.110.0060.00615.79
7.1.100.0060.00516.87
7.1.90.0040.01115.53
7.1.80.0070.00715.96
7.1.70.0020.00816.30
7.1.60.0120.00917.71
7.1.50.0090.01316.32
7.1.40.0050.00815.54
7.1.30.0090.00315.75
7.1.20.0000.01215.90
7.1.10.0000.01215.66
7.1.00.0030.03518.99
7.0.330.0090.00915.33
7.0.320.0040.00415.45
7.0.310.0070.00715.19
7.0.300.0070.00315.08
7.0.290.0120.00015.30
7.0.280.0030.01315.29
7.0.270.0030.01215.49
7.0.260.0070.00715.13
7.0.250.0120.00415.15
7.0.240.0060.00615.27
7.0.230.0070.00715.52
7.0.220.0040.00415.42
7.0.210.0040.00415.52
7.0.200.0010.00815.93
7.0.190.0090.00915.34
7.0.180.0080.00815.49
7.0.170.0000.00915.34
7.0.160.0060.00315.45
7.0.150.0000.01115.36
7.0.140.0090.03718.61
7.0.130.0000.00915.44
7.0.120.0030.00515.30
7.0.110.0080.00315.36
7.0.100.0080.00315.51
7.0.90.0070.00715.45
7.0.80.0040.00815.37
7.0.70.0020.02318.49
7.0.60.0020.02018.34
7.0.50.0080.02218.70
7.0.40.0050.02316.73
7.0.30.0000.02916.69
7.0.20.0030.02016.60
7.0.10.0040.01916.82
7.0.00.0000.02516.64
5.6.400.0060.00314.69
5.6.390.0110.00414.63
5.6.380.0030.01014.39
5.6.370.0060.00314.13
5.6.360.0000.01114.45
5.6.350.0070.01014.30
5.6.340.0060.00414.44
5.6.330.0090.00614.45
5.6.320.0040.00714.05
5.6.310.0070.00714.31
5.6.300.0030.01314.39
5.6.290.0060.00314.11
5.6.280.0080.03717.58
5.6.270.0060.00614.31
5.6.260.0040.00814.52
5.6.250.0110.00314.31
5.6.240.0030.00614.59
5.6.230.0040.01114.31
5.6.220.0020.02617.50
5.6.210.0050.01817.40
5.6.200.0020.03117.80
5.6.190.0060.02617.77
5.6.180.0080.02017.69
5.6.170.0040.01817.66
5.6.160.0050.02317.62
5.6.150.0070.02517.70
5.6.140.0030.02017.73
5.6.130.0020.02317.84
5.6.120.0000.02617.66
5.6.110.0030.02317.83
5.6.100.0040.01717.51
5.6.90.0050.02117.71
5.6.80.0020.02317.35
5.6.70.0030.02117.31
5.6.60.0020.02217.56
5.6.50.0030.03717.41
5.6.40.0050.04317.27
5.6.30.0050.04217.28
5.6.20.0030.04517.50
5.6.10.0070.04017.46
5.6.00.0050.04417.35
5.5.380.0000.01214.08
5.5.370.0000.01114.38
5.5.360.0030.02417.55
5.5.350.0050.02517.29
5.5.340.0030.03017.40
5.5.330.0070.01917.58
5.5.320.0020.02617.70
5.5.310.0080.02317.67
5.5.300.0050.02017.56
5.5.290.0020.02217.52
5.5.280.0060.02017.49
5.5.270.0030.02217.51
5.5.260.0020.02117.51
5.5.250.0100.01517.34
5.5.240.0030.02017.24
5.5.230.0020.02117.26
5.5.220.0050.02217.00
5.5.210.0020.03117.31
5.5.200.0070.04017.11
5.5.190.0070.03517.29
5.5.180.0050.04517.23
5.5.170.0030.01013.91
5.5.160.0040.04117.24
5.5.150.0050.04317.09
5.5.140.0020.04617.41
5.5.130.0090.03117.35
5.5.120.0080.03817.21
5.5.110.0090.03717.19
5.5.100.0060.03917.16
5.5.90.0120.03316.92
5.5.80.0090.04016.93
5.5.70.0080.03617.20
5.5.60.0030.03517.22
5.5.50.0030.04317.21
5.5.40.0070.03817.13
5.5.30.0040.04117.15
5.5.20.0030.04517.03
5.5.10.0030.04017.11
5.5.00.0030.04817.22
5.4.450.0080.01715.23
5.4.440.0070.01615.25
5.4.430.0030.01815.27
5.4.420.0020.02015.17
5.4.410.0040.01915.09
5.4.400.0020.01914.86
5.4.390.0050.02115.05
5.4.380.0030.02415.01
5.4.370.0030.03615.03
5.4.360.0040.04415.15
5.4.350.0030.04114.89
5.4.340.0030.03515.01
5.4.330.0030.00810.80
5.4.320.0050.03714.98
5.4.310.0060.03814.93
5.4.300.0040.03915.01
5.4.290.0050.03315.11
5.4.280.0080.02514.88
5.4.270.0050.03215.10
5.4.260.0050.04015.16
5.4.250.0020.04114.91
5.4.240.0100.03715.07
5.4.230.0060.03315.12
5.4.220.0070.04114.96
5.4.210.0090.03414.95
5.4.200.0080.03415.01
5.4.190.0070.03515.02
5.4.180.0010.04014.96
5.4.170.0030.04214.92
5.4.160.0030.03814.87
5.4.150.0050.04114.83
5.4.140.0070.03813.43
5.4.130.0020.03013.53
5.4.120.0050.02713.60
5.4.110.0050.03713.49
5.4.100.0040.03613.55
5.4.90.0050.04013.57
5.4.80.0050.03513.54
5.4.70.0050.04013.72
5.4.60.0070.02713.62
5.4.50.0030.03613.66
5.4.40.0020.03313.56
5.4.30.0020.04013.60
5.4.20.0030.03513.65
5.4.10.0050.04413.71
5.4.00.0030.03913.29
5.3.290.0060.02812.46
5.3.280.0050.04012.44
5.3.270.0050.04012.39
5.3.260.0030.04012.46
5.3.250.0020.03912.54
5.3.240.0050.04012.38
5.3.230.0080.02012.50
5.3.220.0070.02712.40
5.3.210.0020.04312.45
5.3.200.0030.02212.46
5.3.190.0030.04112.44
5.3.180.0040.03812.45
5.3.170.0030.03912.59
5.3.160.0030.04112.55
5.3.150.0050.03912.46
5.3.140.0030.03612.50
5.3.130.0050.04012.35
5.3.120.0000.04812.47
5.3.110.0030.03812.39
5.3.100.0070.02712.28
5.3.90.0080.03512.07
5.3.80.0070.03612.08
5.3.70.0040.03712.14
5.3.60.0080.02312.21
5.3.50.0030.04112.15
5.3.40.0020.03812.03
5.3.30.0000.03912.19
5.3.20.0050.02811.96
5.3.10.0000.03111.92
5.3.00.0020.04211.85
5.2.170.0030.06011.20
5.2.160.0100.05311.20
5.2.150.0000.04711.23
5.2.140.0070.05311.20
5.2.130.0000.06311.20
5.2.120.0070.05711.20
5.2.110.0000.05311.20
5.2.100.0000.05011.20
5.2.90.0030.04311.20
5.2.80.0030.06311.20
5.2.70.0030.06011.20
5.2.60.0030.06011.20
5.2.50.0070.05011.20
5.2.40.0030.06011.20
5.2.30.0030.04711.20
5.2.20.0030.04711.20
5.2.10.0000.05011.20
5.2.00.0000.06711.20
5.1.60.0030.05011.20
5.1.50.0000.05711.20
5.1.40.0030.05011.20
5.1.30.0000.06011.20
5.1.20.0030.04011.20
5.1.10.0030.05011.20
5.1.00.0030.05311.20
5.0.50.0000.04011.20
5.0.40.0000.04311.20
5.0.30.0000.07011.20
5.0.20.0070.03311.20
5.0.10.0100.03711.20
5.0.00.0070.06011.20
4.4.90.0000.03311.20
4.4.80.0000.03311.20
4.4.70.0030.02711.20
4.4.60.0000.03311.20
4.4.50.0000.03711.20
4.4.40.0000.04011.20
4.4.30.0000.03011.20
4.4.20.0000.03711.20
4.4.10.0000.03311.20
4.4.00.0030.03311.20
4.3.110.0030.03311.20
4.3.100.0000.03711.20
4.3.90.0000.03311.20
4.3.80.0030.05011.20
4.3.70.0000.03311.20
4.3.60.0000.03011.20
4.3.50.0000.03711.20
4.3.40.0030.04711.20
4.3.30.0000.04011.20
4.3.20.0030.03011.20
4.3.10.0000.03311.20
4.3.00.0030.02711.20

preferences:
41.4 ms | 401 KiB | 5 Q