3v4l.org

run code in 300+ PHP versions simultaneously
<?php $assoc = array( "a" => 1, "b" => 0, 0 => 0 ); function is_assoc($in_array){ ksort($in_array); return !ctype_digit( implode('', array_keys($in_array)) ); } echo is_assoc($assoc); ?>

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.40.0070.01118.60
8.3.30.0000.01418.96
8.3.20.0000.00720.36
8.3.10.0000.00822.10
8.3.00.0000.00822.50
8.2.170.0070.01322.96
8.2.160.0120.00919.14
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0100.00726.16
8.2.120.0090.00019.43
8.2.110.0030.00621.97
8.2.100.0060.00617.72
8.2.90.0060.00317.62
8.2.80.0080.00017.97
8.2.70.0000.00817.80
8.2.60.0000.00918.05
8.2.50.0040.00418.10
8.2.40.0030.00520.62
8.2.30.0040.00418.05
8.2.20.0000.00817.72
8.2.10.0000.00717.65
8.2.00.0090.00017.68
8.1.270.0060.00320.35
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00022.45
8.1.230.0110.00019.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0000.00917.13
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0040.00422.13
8.1.150.0070.00018.61
8.1.140.0040.00417.33
8.1.130.0070.00017.81
8.1.120.0030.00517.35
8.1.110.0080.00017.38
8.1.100.0000.00817.38
8.1.90.0050.00217.31
8.1.80.0040.00317.50
8.1.70.0000.00817.34
8.1.60.0000.00817.56
8.1.50.0000.00817.42
8.1.40.0000.00717.52
8.1.30.0080.00017.58
8.1.20.0040.00417.46
8.1.10.0040.00417.45
8.1.00.0040.00417.45
8.0.300.0050.00321.47
8.0.290.0060.00316.88
8.0.280.0070.00018.46
8.0.270.0070.00017.26
8.0.260.0000.00816.92
8.0.250.0000.00716.97
8.0.240.0000.00817.04
8.0.230.0000.00717.09
8.0.220.0030.00316.80
8.0.210.0040.00416.98
8.0.200.0000.00616.83
8.0.190.0030.00616.96
8.0.180.0080.00316.93
8.0.170.0000.00716.91
8.0.160.0000.00816.76
8.0.150.0000.00716.81
8.0.140.0080.00016.73
8.0.130.0000.00613.34
8.0.120.0030.00516.74
8.0.110.0040.00416.79
8.0.100.0000.00716.82
8.0.90.0040.00416.88
8.0.80.0090.01216.82
8.0.70.0000.00716.77
8.0.60.0050.00316.93
8.0.50.0040.00416.70
8.0.30.0140.00517.06
8.0.20.0070.01217.40
8.0.10.0040.00417.02
8.0.00.0140.00316.76
7.4.330.0020.00215.00
7.4.320.0000.00616.49
7.4.300.0000.00716.50
7.4.290.0070.00416.57
7.4.280.0030.00316.46
7.4.270.0060.00016.50
7.4.260.0030.00316.58
7.4.250.0050.00216.56
7.4.240.0030.00416.39
7.4.230.0030.00316.29
7.4.220.0170.00316.55
7.4.210.0060.00816.61
7.4.200.0030.00316.43
7.4.190.0030.00316.58
7.4.160.0100.00716.49
7.4.150.0140.01017.40
7.4.140.0070.01017.86
7.4.130.0140.00816.54
7.4.120.0070.01116.46
7.4.110.0130.00316.41
7.4.100.0090.00616.49
7.4.90.0190.00716.43
7.4.80.0000.01719.39
7.4.70.0070.01016.36
7.4.60.0030.01316.51
7.4.50.0000.00416.48
7.4.40.0100.00322.77
7.4.30.0040.01316.68
7.4.00.0130.00315.11
7.3.330.0000.00613.30
7.3.320.0030.00313.07
7.3.310.0000.00716.23
7.3.300.0030.00316.10
7.3.290.0080.00616.23
7.3.280.0050.01216.21
7.3.270.0130.00417.40
7.3.260.0110.00716.33
7.3.250.0030.01416.38
7.3.240.0090.00916.50
7.3.230.0110.00616.47
7.3.210.0070.01016.57
7.3.200.0160.00619.39
7.3.190.0100.01316.59
7.3.180.0140.00716.36
7.3.170.0120.00316.30
7.3.160.0120.00616.40
7.3.120.0080.00814.77
7.3.10.0080.00816.69
7.3.00.0100.00316.70
7.2.330.0130.01016.61
7.2.320.0080.01116.46
7.2.310.0310.00616.46
7.2.300.0070.01016.38
7.2.290.0040.01216.70
7.2.130.0040.01216.57
7.2.120.0130.00316.90
7.2.110.0080.00816.73
7.2.100.0060.00616.93
7.2.90.0060.00616.84
7.2.80.0030.01316.74
7.2.70.0070.00316.66
7.2.60.0100.00316.71
7.2.50.0070.00416.76
7.2.40.0000.01216.63
7.2.30.0070.00716.88
7.2.20.0080.00616.95
7.2.10.0060.00916.81
7.2.00.0080.00818.14
7.1.250.0040.00715.39
7.1.100.0070.00718.04
7.1.70.0040.00417.01
7.1.60.0030.01019.82
7.1.50.0100.01016.89
7.1.00.0100.02722.34
7.0.200.0000.00816.45
7.0.140.0030.07321.95
7.0.60.0030.04020.06
7.0.50.0170.06717.87
7.0.40.0100.08320.24
7.0.30.0300.07720.34
7.0.20.0230.04720.24
7.0.10.0200.04320.16
7.0.00.0070.04320.22
5.6.280.0000.07721.07
5.6.210.0070.08020.64
5.6.200.0100.08718.29
5.6.190.0130.06720.55
5.6.180.3730.04020.52
5.6.170.0370.07320.58
5.6.160.0100.06720.51
5.6.150.0100.08018.20
5.6.140.0070.07018.28
5.6.130.0000.06018.13
5.6.120.0100.07721.05
5.6.110.0030.09021.15
5.6.100.0030.07721.00
5.6.90.0070.08021.00
5.6.80.0100.05320.41
5.6.70.0200.07320.43
5.5.350.0170.07720.43
5.5.340.0070.03717.98
5.5.330.0100.05720.40
5.5.320.0200.08020.27
5.5.310.0470.06320.28
5.5.300.0030.03717.99
5.5.290.0070.08318.05
5.5.280.0130.08020.86
5.5.270.0070.08320.89
5.5.260.0000.08020.68
5.5.250.0070.08320.69
5.5.240.0100.05720.35
5.4.450.0630.06319.45
5.4.440.0770.06019.45
5.4.430.0700.05019.69
5.4.420.0670.05319.57
5.4.410.0670.05719.42
5.4.400.0430.05718.77
5.4.390.0330.06318.53
5.4.380.0230.07718.52
5.4.370.0270.04018.76
5.4.360.0100.05718.72
5.4.350.0070.03412.02
5.4.340.0110.04912.02
5.4.320.0080.04212.50
5.4.310.0090.03712.50
5.4.300.0080.03912.50
5.4.290.0070.03512.50
5.4.280.0070.04112.40
5.4.270.0070.03712.40
5.4.260.0030.04212.40
5.4.250.0130.07018.88
5.4.240.0100.05318.99
5.4.230.0100.04718.90
5.4.220.0100.04718.76
5.4.210.0100.04718.97
5.4.200.0070.05019.00
5.4.190.0130.04318.89
5.4.180.0070.05018.93
5.4.170.0200.03718.76
5.4.160.0100.04718.93
5.4.150.0100.05018.85
5.4.140.0100.04716.51
5.4.130.0030.04716.38
5.4.120.0070.04716.38
5.4.110.0070.06316.38
5.4.100.0070.05016.38
5.4.90.0070.04716.41
5.4.80.0030.05016.46
5.4.70.0070.04716.46
5.4.60.0030.05016.47
5.4.50.0170.03716.40
5.4.40.0130.05716.39
5.4.30.0070.04716.34
5.4.20.0000.05316.46
5.4.10.0070.04716.43
5.4.00.0200.05315.87
5.3.290.0080.04612.80
5.3.280.0070.05014.57
5.3.270.0130.04314.69
5.3.260.0070.05014.67
5.3.250.0070.05014.62
5.3.240.0070.05014.68
5.3.230.0000.05314.68
5.3.220.0200.03714.75
5.3.210.0030.05314.70
5.3.200.0100.04714.78
5.3.190.0030.05014.53
5.3.180.0070.04714.58
5.3.170.0030.05714.78
5.3.160.0130.04314.55
5.3.150.0030.05314.63
5.3.140.0070.05014.38
5.3.130.0100.06014.53
5.3.120.0100.05014.45
5.3.110.0200.03714.45
5.3.100.0100.05714.19
5.3.90.0100.04314.03
5.3.80.0070.05014.11
5.3.70.0130.06714.08
5.3.60.0070.05014.01
5.3.50.0100.04314.03
5.3.40.0070.04714.16
5.3.30.0070.04713.96
5.3.20.0070.05013.91
5.3.10.0130.04013.63
5.3.00.0130.04313.71
5.2.170.0030.04011.30
5.2.160.0000.04311.22
5.2.150.0070.04011.21
5.2.140.0070.04011.32
5.2.130.0070.03711.08
5.2.120.0070.03711.32
5.2.110.0030.04011.07
5.2.100.0030.04011.18
5.2.90.0100.03311.10
5.2.80.0070.04010.99
5.2.70.0030.04011.18
5.2.60.0130.05311.04
5.2.50.0030.04310.95
5.2.40.0070.03711.08
5.2.30.0200.02311.14
5.2.20.0000.04311.04
5.2.10.0030.04010.95
5.2.00.0100.03310.80
5.1.60.0000.04010.09
5.1.50.0070.04710.15
5.1.40.0070.03010.17
5.1.30.0100.04310.48
5.1.20.0030.03710.57
5.1.10.0030.03710.04
5.1.00.0070.03310.14
5.0.50.0000.0308.49
5.0.40.0070.0208.38
5.0.30.0030.0408.07
5.0.20.0000.0278.27
5.0.10.0030.0278.21
5.0.00.0030.0538.31
4.4.90.0070.0275.95
4.4.80.0030.0275.95
4.4.70.0000.0235.95
4.4.60.0030.0205.95
4.4.50.0000.0235.95
4.4.40.0000.0335.95
4.4.30.0030.0205.95
4.4.20.0030.0205.97
4.4.10.0000.0235.95
4.4.00.0000.0335.95
4.3.110.0000.0235.95
4.3.100.0000.0205.95
4.3.90.0000.0235.95
4.3.80.0030.0405.95
4.3.70.0070.0235.95
4.3.60.0030.0205.95
4.3.50.0030.0305.95
4.3.40.0000.0335.95
4.3.30.0100.0205.95
4.3.20.0000.0235.95
4.3.10.0030.0205.95
4.3.00.0100.0237.60

preferences:
52.76 ms | 400 KiB | 5 Q