3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(["a"=>5,"b"=>6] as $k=>$v){ echo "$k $v"; } /* Wait, what? A parse error? Why, you might ask? (int) is a special case in the lexer. Turns out that casts are lexed specially. Why? Probably to stop the type names being reserved words. That worked out spectacularly, didn't it. This has been around since at least PHP 3. */

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.0110.00716.50
8.3.50.0130.00721.93
8.3.40.0180.00018.67
8.3.30.0060.00919.08
8.3.20.0060.00320.34
8.3.10.0000.00823.66
8.3.00.0080.00020.80
8.2.180.0150.00016.32
8.2.170.0110.00422.96
8.2.160.0130.00020.49
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0050.00320.76
8.2.110.0060.00320.35
8.2.100.0040.00817.91
8.2.90.0060.00319.22
8.2.80.0040.00417.97
8.2.70.0030.00617.34
8.2.60.0030.00717.80
8.2.50.0000.00918.07
8.2.40.0040.00418.22
8.2.30.0070.00418.30
8.2.20.0060.00317.56
8.2.10.0000.00818.05
8.2.00.0000.00817.61
8.1.280.0120.00325.92
8.1.270.0030.00623.97
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.98
8.1.230.0090.00319.16
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0040.00416.88
8.1.180.0000.00818.10
8.1.170.0050.00318.46
8.1.160.0030.00521.95
8.1.150.0000.00718.56
8.1.140.0070.00017.26
8.1.130.0030.00317.70
8.1.120.0030.00417.34
8.1.110.0040.00417.33
8.1.100.0070.00017.39
8.1.90.0050.00217.39
8.1.80.0040.00417.35
8.1.70.0030.00317.37
8.1.60.0050.00317.52
8.1.50.0000.00717.34
8.1.40.0000.00817.49
8.1.30.0040.00417.48
8.1.20.0040.00417.52
8.1.10.0000.00717.40
8.1.00.0070.00017.49
8.0.300.0040.00419.21
8.0.290.0050.00316.75
8.0.280.0000.00718.36
8.0.270.0000.00717.13
8.0.260.0030.00317.25
8.0.250.0040.00416.88
8.0.240.0050.00216.92
8.0.230.0000.00716.79
8.0.220.0030.00316.79
8.0.210.0020.00516.75
8.0.200.0040.00416.98
8.0.190.0000.00716.93
8.0.180.0030.00516.89
8.0.170.0050.00216.87
8.0.160.0000.00716.95
8.0.150.0040.00416.80
8.0.140.0060.00316.76
8.0.130.0030.00313.36
8.0.120.0030.00516.74
8.0.110.0040.00416.83
8.0.100.0000.00716.88
8.0.90.0040.00416.91
8.0.80.0090.00916.89
8.0.70.0070.00016.93
8.0.60.0040.00416.85
8.0.50.0050.00316.95
8.0.30.0140.00817.01
8.0.20.0080.01017.40
8.0.10.0040.00416.99
8.0.00.0110.00616.84
7.4.330.0020.00215.00
7.4.320.0050.00216.34
7.4.300.0000.00616.43
7.4.290.0030.00316.55
7.4.280.0040.00416.52
7.4.270.0030.00316.48
7.4.260.0060.00316.41
7.4.250.0040.00416.49
7.4.240.0050.00216.49
7.4.230.0070.00016.55
7.4.220.0120.00616.42
7.4.210.0040.01116.50
7.4.200.0000.00716.55
7.4.160.0030.01616.36
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0110.00916.33
7.4.120.0100.01016.39
7.4.110.0060.01216.43
7.4.100.0070.01116.41
7.4.90.0070.01116.34
7.4.80.0070.01019.39
7.4.70.0120.01116.59
7.4.60.0100.00716.32
7.4.50.0060.00316.59
7.4.40.0030.01316.54
7.4.30.0060.00916.32
7.4.10.0060.00614.99
7.4.00.0060.01115.00
7.3.330.0000.00613.17
7.3.320.0060.00013.16
7.3.310.0000.00816.39
7.3.300.0000.00616.33
7.3.290.0040.01116.39
7.3.280.0090.00716.36
7.3.270.0040.01817.40
7.3.260.0080.00816.42
7.3.250.0060.01016.39
7.3.240.0130.00316.36
7.3.230.0120.00616.39
7.3.210.0100.00716.27
7.3.200.0180.00419.39
7.3.190.0070.01016.31
7.3.180.0040.01116.32
7.3.170.0040.01216.54
7.3.160.0090.00616.64
7.3.130.0060.01314.80
7.3.120.0020.01615.05
7.3.110.0060.01314.75
7.3.100.0070.00714.76
7.3.90.0040.01114.96
7.3.80.0000.00914.62
7.3.70.0060.00614.89
7.3.60.0060.00614.69
7.3.50.0110.00314.95
7.3.40.0000.01114.84
7.3.30.0030.00914.59
7.3.20.0120.00316.62
7.3.10.0100.00716.61
7.3.00.0030.01016.61
7.2.330.0130.01016.36
7.2.320.0130.00316.64
7.2.310.0090.00916.46
7.2.300.0060.00916.61
7.2.290.0100.00716.59
7.2.260.0100.00615.07
7.2.250.0040.01114.99
7.2.240.0000.01315.09
7.2.230.0110.00714.82
7.2.220.0030.01714.95
7.2.210.0070.00714.75
7.2.200.0070.00415.04
7.2.190.0030.00914.77
7.2.180.0030.01115.07
7.2.170.0000.01014.80
7.2.160.0030.01314.94
7.2.150.0030.01316.82
7.2.140.0000.01016.79
7.2.130.0090.00016.79
7.2.120.0040.00816.84
7.2.110.0000.01316.70
7.2.100.0030.01016.89
7.2.90.0090.00616.75
7.2.80.0080.00816.91
7.2.70.0040.01516.96
7.2.60.0030.01216.90
7.2.50.0110.00416.85
7.2.40.0040.01116.93
7.2.30.0120.00316.87
7.2.20.0090.00016.89
7.2.10.0070.00716.66
7.2.00.0080.00818.12
7.1.330.0070.00715.78
7.1.320.0030.00915.70
7.1.310.0040.01115.62
7.1.300.0140.00015.70
7.1.290.0030.00615.68
7.1.280.0040.00415.77
7.1.270.0100.00315.63
7.1.260.0030.01015.65
7.1.250.0060.00615.76
7.1.240.0070.01015.64
7.1.230.0070.00715.71
7.1.220.0090.00615.68
7.1.210.0000.01115.70
7.1.200.0060.00615.56
7.1.190.0030.01215.49
7.1.180.0090.00315.87
7.1.170.0070.01015.78
7.1.160.0040.00415.70
7.1.150.0040.00815.80
7.1.140.0040.00415.93
7.1.130.0000.01215.73
7.1.120.0030.00615.80
7.1.110.0060.00615.74
7.1.100.0040.00616.98
7.1.90.0090.00015.81
7.1.80.0030.01015.73
7.1.70.0020.00816.16
7.1.60.0150.00517.78
7.1.50.0170.00525.17
7.1.40.0070.00415.93
7.1.30.0000.00815.84
7.1.20.0000.00915.91
7.1.10.0070.00715.80
7.1.00.0020.04219.14
7.0.330.0070.00315.37
7.0.320.0060.00615.24
7.0.310.0030.01015.55
7.0.300.0030.01315.30
7.0.290.0070.00415.43
7.0.280.0040.01115.28
7.0.270.0000.01215.16
7.0.260.0070.00715.36
7.0.250.0080.00415.53
7.0.240.0100.00715.49
7.0.230.0120.00015.51
7.0.220.0030.00915.44
7.0.210.0050.00315.54
7.0.200.0020.00816.11
7.0.190.0040.01115.29
7.0.180.0040.00715.31
7.0.170.0070.00315.20
7.0.160.0060.00915.37
7.0.150.0040.00715.48
7.0.140.0060.04018.79
7.0.130.0060.00315.06
7.0.120.0060.00615.53
7.0.110.0030.00915.47
7.0.100.0000.00815.32
7.0.90.0030.00815.43
7.0.80.0070.00715.30
7.0.70.0070.00315.29
7.0.60.0050.03218.50
7.0.50.0000.02616.61
7.0.40.0040.02916.71
7.0.30.0150.03616.66
7.0.20.0100.04716.92
7.0.10.0030.02916.72
7.0.00.0030.05016.70
5.6.400.0060.00314.00
5.6.390.0030.00614.30
5.6.380.0060.00314.22
5.6.370.0060.00914.56
5.6.360.0030.00714.12
5.6.350.0030.00914.55
5.6.340.0040.01114.42
5.6.330.0070.00714.11
5.6.320.0030.01114.56
5.6.310.0070.00414.48
5.6.300.0030.00914.26
5.6.290.0090.00314.61
5.6.280.0030.04217.66
5.6.270.0090.00614.38
5.6.260.0090.00614.21
5.6.250.0060.00314.53
5.6.240.0000.00814.43
5.6.230.0000.01114.39
5.6.220.0000.01114.46
5.6.210.0050.04517.60
5.6.200.0010.04416.29
5.6.190.0090.04217.35
5.6.180.1680.02917.62
5.6.170.0130.04417.43
5.6.160.0050.03017.31
5.6.150.0050.04816.26
5.6.140.0030.02516.27
5.6.130.0070.04316.31
5.6.120.0020.02817.56
5.6.110.0090.02217.43
5.6.100.0070.02417.57
5.6.90.0050.04517.81
5.6.80.0050.02417.41
5.6.70.0040.00814.32
5.6.60.0080.00414.14
5.6.50.0080.00413.91
5.6.40.0090.00014.15
5.6.30.0030.00914.21
5.6.20.0090.00613.98
5.6.10.0110.00314.38
5.6.00.0100.00314.11
5.5.380.0030.01014.21
5.5.370.0040.00814.34
5.5.360.0030.00714.18
5.5.350.0030.01817.20
5.5.340.0070.02816.12
5.5.330.0080.02817.27
5.5.320.1920.02917.12
5.5.310.0160.03817.35
5.5.300.0070.04016.17
5.5.290.0090.04116.02
5.5.280.0130.03617.57
5.5.270.0060.02417.53
5.5.260.0090.02717.48
5.5.250.0080.03817.49
5.5.240.0060.03817.22
5.5.230.0080.00013.93
5.5.220.0030.00914.00
5.5.210.0100.00314.34
5.5.200.0100.00314.09
5.5.190.0070.00313.95
5.5.180.0060.00914.25
5.5.170.0070.01114.20
5.5.160.0070.01114.16
5.5.150.0030.01014.06
5.5.140.0080.00314.15
5.5.130.0060.00914.20
5.5.120.0100.00613.87
5.5.110.0050.00814.04
5.5.100.0040.00814.26
5.5.90.0070.00713.90
5.5.80.0040.00414.05
5.5.70.0080.00414.43
5.5.60.0030.01014.31
5.5.50.0000.01114.04
5.5.40.0130.00014.18
5.5.30.0070.00414.22
5.5.20.0070.00714.09
5.5.10.0030.01014.00
5.5.00.0040.01113.93
5.4.450.0280.02421.36
5.4.440.0200.02721.36
5.4.430.0170.02221.14
5.4.420.0170.02520.54
5.4.410.0150.02520.54
5.4.400.0130.01720.54
5.4.390.0140.02620.54
5.4.380.0070.03115.74
5.4.370.0080.03615.79
5.4.360.0070.03215.71
5.4.350.0100.03015.76
5.4.340.0060.03015.75
5.4.330.0070.00712.79
5.4.320.0040.02012.62
5.4.310.0030.03012.62
5.4.300.0060.02012.63
5.4.290.0040.02212.62
5.4.280.0100.01612.57
5.4.270.0050.02012.57
5.4.260.0080.01912.57
5.4.250.0070.02112.57
5.4.240.0050.02312.57
5.4.230.0060.02012.57
5.4.220.0040.02312.57
5.4.210.0090.01812.57
5.4.200.0050.02212.57
5.4.190.0020.02412.57
5.4.180.0060.02112.56
5.4.170.0030.02112.57
5.4.160.0060.02012.57
5.4.150.0060.02112.57
5.4.140.0070.02012.41
5.4.130.0030.02212.40
5.4.120.0040.01912.38
5.4.110.0080.01812.38
5.4.100.0080.02312.38
5.4.90.0050.02012.38
5.4.80.0090.01812.38
5.4.70.0020.02312.38
5.4.60.0050.01812.38
5.4.50.0060.01612.38
5.4.40.0040.02112.37
5.4.30.0020.02112.37
5.4.20.0090.01712.37
5.4.10.0040.02012.37
5.4.00.0060.02112.11
5.3.290.0040.02512.80
5.3.280.0040.02212.75
5.3.270.0040.02412.76
5.3.260.0070.01912.76
5.3.250.0070.02312.76
5.3.240.0060.02112.76
5.3.230.0040.02212.75
5.3.220.0050.02012.74
5.3.210.0040.02312.74
5.3.200.0030.02212.74
5.3.190.0060.02112.73
5.3.180.0060.01912.73
5.3.170.0020.02212.73
5.3.160.0040.02112.73
5.3.150.0020.02412.73
5.3.140.0050.02112.73
5.3.130.0060.02412.73
5.3.120.0060.02012.72
5.3.110.0070.02112.72
5.3.100.0050.02212.46
5.3.90.0040.02412.44
5.3.80.0090.01812.43
5.3.70.0050.02312.43
5.3.60.0080.01812.43
5.3.50.0070.02012.39
5.3.40.0050.02212.40
5.3.30.0030.02312.37
5.3.20.0050.02012.26
5.3.10.0020.02212.25
5.3.00.0020.02412.23
5.2.170.0020.0359.18
5.2.160.0060.0289.19
5.2.150.0030.0339.18
5.2.140.0030.0319.18
5.2.130.0030.0309.14
5.2.120.0060.0269.14
5.2.110.0050.0289.14
5.2.100.0040.0299.14
5.2.90.0030.0309.14
5.2.80.0060.0309.14
5.2.70.0050.0309.14
5.2.60.0080.0279.08
5.2.50.0070.0289.05
5.2.40.0080.0259.04
5.2.30.0080.0339.02
5.2.20.0090.0329.00
5.2.10.0060.0268.93
5.2.00.0040.0308.78
5.1.60.0020.0268.06
5.1.50.0070.0228.07
5.1.40.0040.0248.05
5.1.30.0080.0228.40
5.1.20.0020.0298.42
5.1.10.0050.0258.14
5.1.00.0060.0278.14
5.0.50.0030.0226.63
5.0.40.0030.0196.48
5.0.30.0030.0326.29
5.0.20.0040.0196.27
5.0.10.0020.0226.24
5.0.00.0030.0316.23
4.4.90.0040.0144.78
4.4.80.0040.0144.75
4.4.70.0010.0184.75
4.4.60.0010.0174.75
4.4.50.0040.0144.77
4.4.40.0050.0234.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0080.0104.84
4.4.00.0020.0264.76
4.3.110.0020.0164.67
4.3.100.0010.0164.66
4.3.90.0030.0144.63
4.3.80.0040.0224.59
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0050.0134.63
4.3.40.0030.0234.54
4.3.30.0010.0173.28
4.3.20.0000.0183.26
4.3.10.0010.0163.22
4.3.00.0200.01311.80

preferences:
47.14 ms | 401 KiB | 5 Q