3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); // strict types are enabled, all three examples should emit wrong key type exception ['1' => true]; $a = '1'; [$a => true]; [1 => true][$a]; // ie. emit type exception when the key type is different than it will be, ie. int for numeric input, otherwise string

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.4.120.0100.00822.33
8.4.110.0110.00920.64
8.4.100.0130.00617.66
8.4.90.0110.01018.65
8.4.80.0150.00817.67
8.4.70.0110.01217.61
8.4.60.0120.00718.76
8.4.50.0110.00917.99
8.4.40.0030.00617.48
8.4.30.0060.00320.45
8.4.20.0060.01018.01
8.4.10.0080.00022.43
8.3.250.0120.00619.00
8.3.240.0140.00416.63
8.3.230.0150.00416.63
8.3.220.0120.00617.11
8.3.210.0070.00816.68
8.3.200.0070.00216.44
8.3.190.0120.00718.62
8.3.180.0090.01018.32
8.3.170.0040.00416.64
8.3.160.0120.00318.39
8.3.150.0120.00620.64
8.3.140.0150.00416.48
8.3.130.0100.00018.26
8.3.120.0080.00018.88
8.3.110.0030.00520.94
8.3.100.0090.00024.06
8.3.90.0060.00326.77
8.3.80.0050.00516.63
8.3.70.0090.01216.58
8.3.60.0100.00718.50
8.3.50.0110.00724.40
8.3.40.0100.01018.46
8.3.30.0070.00718.59
8.3.20.0030.00524.18
8.3.10.0000.00824.66
8.3.00.0050.00326.16
8.2.290.0080.00220.34
8.2.280.0110.00718.46
8.2.270.0130.00617.00
8.2.260.0040.00418.76
8.2.250.0030.00516.71
8.2.240.0040.00416.95
8.2.230.0100.00022.58
8.2.220.0150.00337.54
8.2.210.0000.00826.77
8.2.200.0080.00016.75
8.2.190.0130.00316.58
8.2.180.0110.00725.92
8.2.170.0070.00718.96
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0160.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0090.00022.23
8.2.100.0030.01017.72
8.2.90.0060.00317.91
8.2.80.0030.00618.03
8.2.70.0040.00417.93
8.2.60.0060.00318.09
8.2.50.0080.00018.10
8.2.40.0040.00421.02
8.2.30.0030.00519.12
8.2.20.0030.00818.17
8.2.10.0040.00419.06
8.2.00.0040.00419.14
8.1.330.0120.00621.89
8.1.320.0090.00918.30
8.1.310.0100.00718.37
8.1.300.0070.01417.79
8.1.290.0030.00618.88
8.1.280.0180.00725.92
8.1.270.0050.00323.99
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0040.00717.36
8.1.230.0080.00420.91
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0000.00817.10
8.1.190.0030.00617.10
8.1.180.0030.00618.10
8.1.170.0050.00318.63
8.1.160.0070.00319.06
8.1.150.0020.00518.79
8.1.140.0050.00320.17
8.1.130.0040.00420.07
8.1.120.0050.00317.42
8.1.110.0000.00917.36
8.1.100.0000.00917.45
8.1.90.0000.00717.28
8.1.80.0030.00317.32
8.1.70.0020.00517.30
8.1.60.0030.00617.43
8.1.50.0040.00417.36
8.1.40.0000.00817.50
8.1.30.0040.00417.63
8.1.20.0000.00917.61
8.1.10.0040.00417.62
8.1.00.0000.00817.55
8.0.300.0060.00320.07
8.0.290.0000.00816.63
8.0.280.0030.00318.29
8.0.270.0030.00316.72
8.0.260.0060.00020.14
8.0.250.0030.00316.78
8.0.240.0000.00616.89
8.0.230.0000.00716.79
8.0.220.0060.00316.82
8.0.210.0020.00516.87
8.0.200.0040.00416.93
8.0.190.0040.00416.91
8.0.180.0000.00716.73
8.0.170.0030.00616.75
8.0.160.0000.00816.90
8.0.150.0050.00316.80
8.0.140.0070.00016.70
8.0.130.0050.00013.21
8.0.120.0090.00016.82
8.0.110.0030.00516.79
8.0.100.0000.00716.93
8.0.90.0000.00716.85
8.0.80.0080.01016.73
8.0.70.0080.00016.62
8.0.60.0070.00016.63
8.0.50.0040.00416.64
8.0.30.0060.01016.66
8.0.20.0110.00816.81
8.0.10.0000.00716.81
8.0.00.0080.01116.77
7.4.330.0040.00015.55
7.4.320.0040.00416.53
7.4.300.0060.00016.54
7.4.290.0000.00716.33
7.4.280.0070.00016.50
7.4.270.0040.00416.58
7.4.260.0000.00613.23
7.4.250.0080.00016.49
7.4.240.0000.00716.48
7.4.230.0070.00016.57
7.4.220.0030.00316.55
7.4.210.0060.00916.51
7.4.200.0030.00516.41
7.4.130.0140.00716.49
7.4.120.0180.00316.33
7.4.110.0100.00716.41
7.4.100.0180.00316.56
7.4.90.0100.00816.33
7.4.80.0130.00816.41
7.4.70.0090.00816.52
7.4.60.0090.00916.48
7.4.50.0110.00916.29
7.4.40.0070.01016.36
7.4.30.0130.00416.37
7.4.20.0090.00916.53
7.4.10.0120.01016.42
7.4.00.0050.01216.53
7.3.330.0000.00616.33
7.3.320.0030.00313.04
7.3.310.0070.00016.27
7.3.300.0060.00016.10
7.3.290.0060.00916.16
7.3.280.0080.00816.11
7.3.260.0670.00716.14
7.3.230.0110.01116.32
7.3.210.0080.00816.37
7.3.200.0120.00616.14
7.3.190.0070.01016.56
7.3.180.0090.00816.42
7.3.170.0060.01116.25
7.3.160.0070.01116.26
7.3.150.0090.00816.31
7.3.140.0080.00916.21
7.3.130.0070.01016.21
7.3.120.0100.00716.35
7.3.110.0140.00516.45
7.3.100.0070.01316.29
7.3.90.0050.01116.33
7.3.80.0030.01316.63
7.3.70.0080.00816.22
7.3.60.0040.01316.41
7.3.50.0100.00916.24
7.3.40.0100.00616.26
7.3.30.0020.01416.24
7.3.20.0100.00716.40
7.3.10.0080.01216.22
7.3.00.0110.01016.28
7.2.330.0090.00816.39
7.2.320.0040.01316.39
7.2.310.0110.00616.39
7.2.300.0140.00416.35
7.2.290.0100.00716.59
7.2.280.0120.00616.30
7.2.270.0060.01116.35
7.2.260.0100.00716.24
7.2.250.0100.01016.44
7.2.240.0090.01116.31
7.2.230.0070.01316.39
7.2.220.0100.00716.37
7.2.210.0050.01116.38
7.2.200.0090.00816.48
7.2.190.0050.01316.37
7.2.180.0110.00716.44
7.2.170.0110.00616.31
7.2.160.0060.01116.24
7.2.150.0110.00616.55
7.2.140.0130.00716.31
7.2.130.0180.00416.35
7.2.120.0090.01016.42
7.2.110.0150.00516.38
7.2.100.0090.00916.45
7.2.90.0100.00916.44
7.2.80.0050.01416.28
7.2.70.0100.01116.27
7.2.60.0080.01516.42
7.2.50.0080.01116.36
7.2.40.0140.00416.41
7.2.30.0080.01116.39
7.2.20.0070.01316.34
7.2.10.0110.00716.53
7.2.00.0120.00916.37
7.1.330.0190.01115.30
7.1.320.0100.01915.66
7.1.310.0270.00815.45
7.1.300.0220.01015.38
7.1.290.0510.01715.37
7.1.280.0190.00915.39
7.1.270.0250.00715.23
7.1.260.0220.00615.41
7.1.250.0240.00515.15
7.1.240.0220.00615.27
7.1.230.0170.01615.27
7.1.220.0250.00315.41
7.1.210.0150.01215.45
7.1.200.0430.01115.38
7.1.190.0200.01015.11
7.1.180.0190.01015.49
7.1.170.0230.01115.46
7.1.160.0240.00715.40
7.1.150.0270.00315.39
7.1.140.0140.01415.39
7.1.130.0230.00615.39
7.1.120.0160.00515.38
7.1.110.0160.00614.99
7.1.100.0200.01015.46
7.1.90.0300.00715.52
7.1.80.0120.01215.34
7.1.70.0180.01215.21
7.1.60.0200.00715.34
7.1.50.0140.01315.26
7.1.40.0140.01215.40
7.1.30.0170.00015.29
7.1.20.0120.00615.50
7.1.10.0070.01015.44
7.1.00.0070.01015.36
7.0.330.0200.00414.92
7.0.320.0150.00514.87
7.0.310.0200.00414.94
7.0.300.0180.00715.18
7.0.290.0220.00715.09
7.0.280.0210.00915.37
7.0.270.0130.01015.07
7.0.260.0230.01315.18
7.0.250.0120.00615.09
7.0.240.0230.00015.10
7.0.230.0180.01214.91
7.0.220.0170.01415.18
7.0.210.0220.01615.25
7.0.200.0250.00815.02
7.0.190.0160.00615.03
7.0.180.0160.01015.13
7.0.170.0100.01014.98
7.0.160.0070.01615.26
7.0.150.0200.00715.24
7.0.140.0100.00615.22
7.0.130.0070.01115.05
7.0.120.0030.01215.02
7.0.110.0060.00915.20
7.0.100.0070.01015.13
7.0.90.0040.01215.21
7.0.80.0070.00715.21
7.0.70.0090.00615.44
7.0.60.0120.00915.22
7.0.50.0130.00315.07
7.0.40.0120.00315.11
7.0.30.0080.01115.21
7.0.20.0160.00415.16
7.0.10.0060.00915.04
7.0.00.0130.00315.00
5.6.400.0170.01815.82
5.6.390.0190.01015.75
5.6.380.0160.01115.62
5.6.370.0160.01315.89
5.6.360.0170.01415.79
5.6.350.0140.01116.16
5.6.340.0230.00815.63
5.6.330.0130.01015.68
5.6.320.0120.00915.86
5.6.310.0260.01415.88
5.6.300.0120.00615.77
5.6.290.0140.01115.84
5.6.280.0130.00716.08
5.6.270.0060.01215.88
5.6.260.0070.01115.85
5.6.250.0090.00915.91
5.6.240.0030.01615.77
5.6.230.0060.01315.77
5.6.220.0060.01316.03
5.6.210.0030.01415.91
5.6.200.0120.01215.86
5.6.190.0080.01115.85
5.6.180.0030.01515.72
5.6.170.0060.01615.87
5.6.160.0040.01715.74
5.6.150.0110.01315.90
5.6.140.0160.00316.07
5.6.130.0150.00816.14
5.6.120.0060.01516.24
5.6.110.0110.00715.88
5.6.100.0180.00815.88
5.6.90.0080.01115.92
5.6.80.0070.01415.86
5.6.70.0160.00315.70
5.6.60.0130.00615.55
5.6.50.0080.01115.83
5.6.40.0110.00815.82
5.6.30.0080.01215.82
5.6.20.0130.00615.72
5.6.10.0060.01215.83
5.6.00.0150.00315.86
5.5.380.0230.01315.59
5.5.370.0130.01615.69
5.5.360.0210.01015.90
5.5.350.0140.01715.82
5.5.340.0210.00915.98
5.5.330.0190.01115.57
5.5.320.0180.01215.61
5.5.310.0180.01115.79
5.5.300.0170.02015.92
5.5.290.0170.01415.55
5.5.280.0160.01915.85
5.5.270.0220.00915.51
5.5.260.0200.01115.68
5.5.250.0230.01015.83
5.5.240.0240.00415.45
5.5.230.0220.00815.82
5.5.220.0210.00715.64
5.5.210.0120.01815.68
5.5.200.0170.01315.53
5.5.190.0210.00915.74
5.5.180.0230.00515.79
5.5.170.0260.00715.84
5.5.160.0210.00915.78
5.5.150.0160.01316.01
5.5.140.0190.01015.55
5.5.130.0150.01515.88
5.5.120.0230.00615.59
5.5.110.0130.01615.79
5.5.100.0240.00915.63
5.5.90.0230.00715.71
5.5.80.0100.02015.67
5.5.70.0290.00715.83
5.5.60.0250.01415.93
5.5.50.0240.00915.89
5.5.40.0240.01015.70
5.5.30.0180.01115.75
5.5.20.0310.00015.78
5.5.10.0200.01215.45
5.5.00.0240.01215.81
5.4.450.0250.00012.54
5.4.440.0160.00512.40
5.4.430.0140.00712.48
5.4.420.0110.01112.47
5.4.410.0160.00712.51
5.4.400.0220.00012.30
5.4.390.0150.00612.54
5.4.380.0150.00712.51
5.4.370.0180.00612.43
5.4.360.0180.00312.44
5.4.350.0210.00312.23
5.4.340.0190.00312.37
5.4.330.0140.01012.25
5.4.320.0120.00912.46
5.4.310.0210.00012.30
5.4.300.0190.00512.55
5.4.290.0200.00412.40
5.4.280.0200.00512.31
5.4.270.0180.00712.33
5.4.260.0150.00712.32
5.4.250.0160.00612.55
5.4.240.0150.00612.53
5.4.230.0190.00812.24
5.4.220.0170.00612.42
5.4.210.0130.01012.13
5.4.200.0220.00012.54
5.4.190.0140.00912.26
5.4.180.0160.01012.47
5.4.170.0130.01012.43
5.4.160.0120.01112.25
5.4.150.0240.00012.66
5.4.140.0180.00412.26
5.4.130.0120.00812.32
5.4.120.0130.00712.54
5.4.110.0160.00512.33
5.4.100.0180.00612.35
5.4.90.0170.00412.35
5.4.80.0130.01012.28
5.4.70.0130.00912.37
5.4.60.0200.00412.31
5.4.50.0200.00312.33
5.4.40.0060.01712.30
5.4.30.0180.00412.36
5.4.20.0170.00512.40
5.4.10.0140.01012.37
5.4.00.0190.00712.44
5.3.290.0100.01312.99
5.3.280.0160.00712.73
5.3.270.0140.01112.71
5.3.260.0130.01012.65
5.3.250.0090.01212.67
5.3.240.0120.01212.54
5.3.230.0130.00912.77
5.3.220.0150.00712.64
5.3.210.0170.00712.59
5.3.200.0070.01412.59
5.3.190.0040.01912.66
5.3.180.0200.00412.88
5.3.170.0150.00812.82
5.3.160.0110.01112.82
5.3.150.0150.00912.70
5.3.140.0200.00312.67
5.3.130.0110.01412.66
5.3.120.0110.01112.85
5.3.110.0180.00712.77
5.3.100.0120.01212.70
5.3.90.0140.01112.79
5.3.80.0180.00612.65
5.3.70.0160.00812.94
5.3.60.0160.00912.88
5.3.50.0160.00812.64
5.3.40.0150.00912.58
5.3.30.0140.01112.64
5.3.20.0180.00712.61
5.3.10.0190.00212.43
5.3.00.0160.01012.41
5.2.170.0050.01311.84
5.2.160.0100.01011.87
5.2.150.0160.00311.79
5.2.140.0210.00411.64
5.2.130.0130.00511.80
5.2.120.0120.00811.86
5.2.110.0160.00611.80
5.2.100.0130.01311.77
5.2.90.0090.01311.75
5.2.80.0120.00811.72
5.2.70.0110.00711.74
5.2.60.0050.01311.68
5.2.50.0070.01911.80
5.2.40.0130.00611.76
5.2.30.0160.00311.64
5.2.20.0090.01211.46
5.2.10.0100.00711.44
5.2.00.0120.00611.36
5.1.60.0130.00411.06
5.1.50.0090.00610.70
5.1.40.0050.01110.83
5.1.30.0150.00510.96
5.1.20.0140.00510.77
5.1.10.0080.00810.83
5.1.00.0100.00710.63
5.0.50.0080.00810.07
5.0.40.0100.00510.13
5.0.30.0070.0089.81
5.0.20.0070.0079.85
5.0.10.0060.0099.63
5.0.00.0120.0039.64
4.4.90.0070.0048.29
4.4.80.0090.0008.29
4.4.70.0110.0008.29
4.4.60.0090.0008.29
4.4.50.0060.0038.29
4.4.40.0040.0048.29
4.4.30.0100.0008.29
4.4.20.0070.0028.29
4.4.10.0040.0078.29
4.4.00.0050.0068.29
4.3.110.0060.0038.29
4.3.100.0070.0038.29
4.3.90.0040.0088.29
4.3.80.0100.0028.29
4.3.70.0080.0048.29
4.3.60.0120.0008.29
4.3.50.0110.0008.29
4.3.40.0130.0008.29
4.3.30.0040.0048.29
4.3.20.0050.0058.29
4.3.10.0040.0048.29
4.3.00.0100.0008.29

preferences:
31.8 ms | 403 KiB | 5 Q