3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isMangled($key) { $arr = []; $arr[$key] = null; var_dump((string) $key, (string) key($arr)); return (string) $key !== (string) key($arr); } var_dump( isMangled(1), isMangled(1.5), isMangled(null), isMangled("test"), isMangled("test\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.0090.00618.31
8.3.50.0100.00723.00
8.3.40.0090.00618.96
8.3.30.0030.01219.19
8.3.20.0050.00320.36
8.3.10.0080.00023.54
8.3.00.0050.00317.63
8.2.180.0160.00318.18
8.2.170.0070.00722.96
8.2.160.0140.00020.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00626.16
8.2.120.0040.00420.90
8.2.110.0080.00421.04
8.2.100.0070.00417.91
8.2.90.0050.00318.03
8.2.80.0030.00617.97
8.2.70.0080.00017.63
8.2.60.0050.00317.79
8.2.50.0070.00318.07
8.2.40.0080.00017.91
8.2.30.0040.00418.08
8.2.20.0000.00717.68
8.2.10.0040.00418.08
8.2.00.0050.00217.66
8.1.280.0110.00725.92
8.1.270.0090.00023.79
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0180.00322.69
8.1.230.0040.00720.97
8.1.220.0050.00317.74
8.1.210.0040.00418.91
8.1.200.0060.00617.35
8.1.190.0030.00517.13
8.1.180.0060.00318.10
8.1.170.0040.00418.54
8.1.160.0040.00422.01
8.1.150.0000.00718.75
8.1.140.0040.00417.40
8.1.130.0000.00817.84
8.1.120.0000.00717.37
8.1.110.0000.00817.29
8.1.100.0040.00417.38
8.1.90.0000.00817.46
8.1.80.0030.00417.47
8.1.70.0090.00017.49
8.1.60.0050.00317.62
8.1.50.0030.00517.45
8.1.40.0050.00317.52
8.1.30.0040.00417.71
8.1.20.0110.00017.64
8.1.10.0030.00617.47
8.1.00.0040.00417.51
8.0.300.0000.00720.04
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0000.00717.16
8.0.260.0030.00317.17
8.0.250.0040.00416.84
8.0.240.0000.00716.94
8.0.230.0000.00716.91
8.0.220.0070.00016.77
8.0.210.0030.00416.91
8.0.200.0040.00416.79
8.0.190.0070.00016.90
8.0.180.0000.00716.72
8.0.170.0050.00316.93
8.0.160.0000.00716.90
8.0.150.0030.00316.82
8.0.140.0060.00316.83
8.0.130.0000.00613.25
8.0.120.0040.00416.89
8.0.110.0040.00416.68
8.0.100.0040.00416.88
8.0.90.0050.00216.90
8.0.80.0130.00616.73
8.0.70.0040.00416.77
8.0.60.0000.00916.80
8.0.50.0070.00016.74
8.0.30.0130.00816.94
8.0.20.0090.00917.40
8.0.10.0000.00716.91
8.0.00.0070.01016.90
7.4.330.0070.00015.00
7.4.320.0030.00316.52
7.4.300.0060.00016.58
7.4.290.0070.00016.59
7.4.280.0000.00716.66
7.4.270.0000.00716.51
7.4.260.0000.00716.48
7.4.250.0050.00216.52
7.4.240.0040.00416.62
7.4.230.0040.00416.31
7.4.220.0060.01616.55
7.4.210.0130.00316.54
7.4.200.0000.00716.51
7.4.160.0180.00016.45
7.4.150.0150.00417.40
7.4.140.0100.01317.86
7.4.130.0070.01116.45
7.4.120.0080.00916.51
7.4.110.0070.01116.61
7.4.100.0060.01316.64
7.4.90.0090.00916.50
7.4.80.0060.01019.39
7.4.70.0150.01616.46
7.4.60.0060.01016.44
7.4.50.0030.00516.31
7.4.40.0110.01116.52
7.4.30.0030.01316.51
7.4.00.0070.01015.10
7.3.330.0020.00213.37
7.3.320.0000.00513.38
7.3.310.0000.00716.36
7.3.300.0030.00316.39
7.3.290.0060.00916.43
7.3.280.0090.01116.38
7.3.270.0090.00917.40
7.3.260.0150.00316.36
7.3.240.0140.00316.44
7.3.230.0000.01716.63
7.3.210.0140.00316.34
7.3.200.0070.01319.39
7.3.190.0110.00716.31
7.3.180.0050.01016.46
7.3.170.0100.00616.68
7.3.160.0170.00316.26
7.3.120.0060.00814.82
7.3.110.0050.01114.75
7.3.100.0050.01114.72
7.3.90.0070.00714.81
7.3.80.0060.00514.76
7.3.70.0060.00814.66
7.3.60.0100.00314.77
7.3.50.0070.00614.88
7.3.40.0060.01114.70
7.3.30.0030.01014.81
7.3.20.0110.00216.55
7.3.10.0050.00816.88
7.3.00.0090.00616.61
7.2.330.0120.00616.21
7.2.320.0110.01116.57
7.2.310.0100.00616.47
7.2.300.0080.00816.41
7.2.290.0120.00916.34
7.2.250.0130.00315.21
7.2.240.0090.00815.01
7.2.230.0080.01014.84
7.2.220.0050.01215.00
7.2.210.0070.00914.93
7.2.200.0080.00814.90
7.2.190.0060.00914.82
7.2.180.0100.00714.96
7.2.170.0070.00814.88
7.2.160.0000.01415.09
7.2.150.0070.00317.04
7.2.140.0060.00916.96
7.2.130.0000.01616.91
7.2.120.0100.00316.93
7.2.110.0030.01216.79
7.2.100.0040.01116.71
7.2.90.0040.01117.03
7.2.80.0100.00717.09
7.2.70.0090.00617.02
7.2.60.0050.01116.75
7.2.50.0060.00916.65
7.2.40.0120.00416.77
7.2.30.0100.01016.69
7.2.20.0120.00616.56
7.2.10.0070.01316.66
7.2.00.0100.00618.21
7.1.330.0080.00815.82
7.1.320.0020.01215.76
7.1.310.0030.01215.86
7.1.300.0060.00315.78
7.1.290.0050.01015.94
7.1.280.0080.00815.86
7.1.270.0030.00915.83
7.1.260.0020.01415.65
7.1.250.0060.00715.79
7.1.200.0090.00615.71
7.1.100.0030.01017.78
7.1.70.0040.00417.30
7.1.60.0120.01219.40
7.1.50.0030.01616.96
7.1.00.0000.08022.30
7.0.200.0070.00016.83
7.0.140.0030.07321.95
7.0.60.0030.08020.05
7.0.50.0000.05317.73
7.0.40.0070.04020.24
7.0.30.0270.05020.23
7.0.20.0170.06320.22
7.0.10.0070.09020.23
7.0.00.0100.08320.09
5.6.280.0100.06721.07
5.6.210.0170.07320.66
5.6.200.0030.04718.27
5.6.190.0130.08320.42
5.6.180.0070.05720.52
5.6.170.0370.03720.59
5.6.160.0100.07720.54
5.6.150.0030.08318.29
5.6.140.0100.08018.23
5.6.130.0030.07718.19
5.6.120.0070.05721.10
5.6.110.0000.09721.14
5.6.100.0200.08020.89
5.6.90.0070.06320.98
5.6.80.0070.04020.38
5.5.350.0000.09020.32
5.5.340.0130.07717.95
5.5.330.0000.04720.37
5.5.320.0070.08020.27
5.5.310.0200.06020.38
5.5.300.0030.06717.95
5.5.290.0070.08018.09
5.5.280.0070.05320.68
5.5.270.0100.08320.93
5.5.260.0070.08720.88
5.5.250.0030.05720.61
5.5.240.0000.07720.26
5.4.450.0330.03719.41
5.4.440.0330.04019.41
5.4.430.0870.05019.64
5.4.420.1000.06319.32
5.4.410.1000.06019.41
5.4.400.1100.04719.21
5.4.390.1100.05319.31
5.4.380.0370.04718.52
5.4.370.0370.06718.80
5.4.360.0400.06718.77
5.4.350.0200.06018.80
5.4.340.0530.06318.55
5.4.320.0060.04612.51
5.4.310.0010.04112.50
5.4.300.0080.03412.50
5.4.290.0030.04012.50
5.4.280.0090.03212.40
5.4.270.0050.03512.40
5.4.260.0040.03812.40
5.4.250.0080.03412.40
5.4.240.0040.03912.40
5.4.230.0030.03912.39
5.4.220.0080.03412.39
5.4.210.0050.03512.39
5.4.200.0050.03712.39
5.4.190.0080.03312.39
5.4.180.0060.03512.39
5.4.170.0080.05012.39
5.4.160.0020.03912.39
5.4.150.0080.03212.39
5.4.140.0080.03512.07
5.4.130.0060.04012.06
5.4.120.0080.03212.01
5.4.110.0050.03512.01
5.4.100.0060.03412.01
5.4.90.0050.03912.02
5.4.80.0050.03612.01
5.4.70.0090.03112.01
5.4.60.0040.03512.01
5.4.50.0060.03612.01
5.4.40.0050.03412.00
5.4.30.0050.03611.99
5.4.20.0080.03312.00
5.4.10.0090.03011.99
5.4.00.0040.03911.48
5.3.290.0090.03712.80
5.3.280.0030.03912.70
5.3.270.0060.03812.73
5.3.260.0020.04112.72
5.3.250.0030.03812.72
5.3.240.0030.03812.72
5.3.230.0090.03412.71
5.3.220.0060.03612.68
5.3.210.0060.03812.68
5.3.200.0070.03412.68
5.3.190.0060.04212.68
5.3.180.0070.03512.67
5.3.170.0030.03912.66
5.3.160.0020.04012.68
5.3.150.0060.03812.67
5.3.140.0050.03612.66
5.3.130.0040.04012.66
5.3.120.0040.04012.66
5.3.110.0080.03712.66
5.3.100.0070.03912.13
5.3.90.0080.03412.11
5.3.80.0020.04012.09
5.3.70.0080.03412.09
5.3.60.0040.03712.08
5.3.50.0040.03712.02
5.3.40.0050.03612.02
5.3.30.0050.03511.98
5.3.20.0030.03711.77
5.3.10.0060.03911.74
5.3.00.0070.03911.71
5.2.170.0070.0289.22
5.2.160.0040.0349.21
5.2.150.0070.0339.21
5.2.140.0040.0349.21
5.2.130.0050.0349.17
5.2.120.0050.0339.17
5.2.110.0020.0319.18
5.2.100.0050.0309.18
5.2.90.0060.0319.18
5.2.80.0040.0309.17
5.2.70.0040.0309.18
5.2.60.0060.0289.12
5.2.50.0050.0319.09
5.2.40.0020.0309.07
5.2.30.0020.0319.05
5.2.20.0050.0279.04
5.2.10.0040.0288.95
5.2.00.0040.0298.80
5.1.60.0030.0248.09
5.1.50.0050.0248.08
5.1.40.0010.0268.07
5.1.30.0030.0278.42
5.1.20.0030.0288.44
5.1.10.0040.0268.16
5.1.00.0030.0268.16
5.0.50.0060.0186.64
5.0.40.0040.0186.50
5.0.30.0020.0326.31
5.0.20.0030.0196.28
5.0.10.0040.0196.25
5.0.00.0050.0296.25
4.4.90.0020.0164.78
4.4.80.0030.0144.76
4.4.70.0030.0154.76
4.4.60.0020.0154.75
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0010.0174.76
4.4.20.0010.0174.84
4.4.10.0020.0164.85
4.4.00.0010.0264.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0040.0134.63
4.3.80.0010.0264.58
4.3.70.0020.0154.63
4.3.60.0020.0154.62
4.3.50.0010.0174.63
4.3.40.0020.0244.54
4.3.30.0030.0153.30
4.3.20.0030.0143.27
4.3.10.0020.0183.24
4.3.00.0070.02711.58

preferences:
51.4 ms | 400 KiB | 5 Q