3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); $someFoo = '{ "Foo" : "Bar" }'; $asciiData = $someFoo; echo mb_detect_encoding($asciiData) . "\r\n"; var_dump(json_decode($asciiData)); $utf8Data = utf8_encode($someFoo); echo mb_detect_encoding($utf8Data) . "\r\n"; var_dump(json_decode($utf8Data));

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.70.0120.00916.63
8.3.60.0120.00316.75
8.3.50.0110.00622.92
8.3.40.0000.01418.65
8.3.30.0120.00319.01
8.3.20.0050.00220.21
8.3.10.0080.00021.76
8.3.00.0080.00019.79
8.2.180.0100.01018.29
8.2.170.0100.00722.96
8.2.160.0070.01020.57
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0070.01126.16
8.2.120.0080.00021.02
8.2.110.0060.00320.42
8.2.100.0040.00819.57
8.2.90.0040.00419.35
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0050.00318.02
8.2.30.0040.00418.02
8.2.20.0080.00017.86
8.2.10.0040.00418.13
8.2.00.0000.00717.75
8.1.280.0090.00925.92
8.1.270.0040.00423.66
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00023.97
8.1.230.0110.00017.42
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0080.00017.35
8.1.180.0090.00018.10
8.1.170.0030.00518.62
8.1.160.0040.00422.12
8.1.150.0070.00018.84
8.1.140.0030.00517.55
8.1.130.0070.00017.84
8.1.120.0040.00417.49
8.1.110.0050.00217.43
8.1.100.0040.00417.48
8.1.90.0000.00717.41
8.1.80.0000.00717.40
8.1.70.0050.00217.46
8.1.60.0000.00817.64
8.1.50.0000.00817.56
8.1.40.0040.00417.63
8.1.30.0040.00417.64
8.1.20.0040.00417.73
8.1.10.0030.00517.55
8.1.00.0070.00017.53
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.51
8.0.270.0070.00017.23
8.0.260.0030.00317.25
8.0.250.0080.00016.97
8.0.240.0030.00616.92
8.0.230.0040.00416.93
8.0.220.0070.00016.92
8.0.210.0070.00016.87
8.0.200.0070.00017.03
8.0.190.0040.00417.03
8.0.180.0030.00617.02
8.0.170.0030.00517.02
8.0.160.0040.00417.02
8.0.150.0000.00716.92
8.0.140.0000.00716.80
8.0.130.0050.00313.30
8.0.120.0040.00416.88
8.0.110.0040.00416.98
8.0.100.0040.00416.99
8.0.90.0030.00416.96
8.0.80.0100.00716.93
8.0.70.0050.00217.04
8.0.60.0000.00716.75
8.0.50.0070.00016.91
8.0.30.0170.00217.02
8.0.20.0110.00917.40
8.0.10.0000.00716.73
8.0.00.0150.00716.88
7.4.330.0050.00015.14
7.4.320.0030.00316.51
7.4.300.0070.00016.52
7.4.290.0040.00416.59
7.4.280.0040.00416.65
7.4.270.0000.00716.67
7.4.260.0000.00716.67
7.4.250.0050.00216.47
7.4.240.0000.00816.54
7.4.230.0000.00816.31
7.4.220.0070.01116.43
7.4.210.0030.01216.48
7.4.200.0040.00316.36
7.4.160.0130.00316.44
7.4.150.0090.00917.40
7.4.140.0080.00917.86
7.4.130.0070.01116.59
7.4.120.0100.00916.41
7.4.110.0100.01016.61
7.4.100.0110.00716.61
7.4.90.0140.00416.35
7.4.80.0040.01219.39
7.4.70.0060.00916.51
7.4.60.0120.01116.25
7.4.50.0060.00316.57
7.4.40.0040.01416.57
7.4.30.0100.00716.43
7.4.00.0080.00814.96
7.3.330.0030.00313.16
7.3.320.0000.00513.23
7.3.310.0030.00316.37
7.3.300.0070.00016.31
7.3.290.0080.00616.24
7.3.280.0120.00716.33
7.3.270.0140.00317.40
7.3.260.0100.00716.55
7.3.240.0100.00716.37
7.3.230.0070.01016.59
7.3.210.0130.00316.51
7.3.200.0120.00619.39
7.3.190.0050.01116.32
7.3.180.0110.00616.21
7.3.170.0030.01916.65
7.3.160.0100.00516.27
7.3.120.0060.01014.97
7.3.110.0070.01014.77
7.3.100.0030.00614.80
7.3.90.0060.00314.71
7.3.80.0090.00314.86
7.3.70.0080.00414.81
7.3.60.0030.01014.80
7.3.50.0040.01114.80
7.3.40.0030.01314.76
7.3.30.0070.01014.71
7.3.20.0040.01116.48
7.3.10.0000.01516.58
7.3.00.0090.00316.75
7.2.330.0120.00616.43
7.2.320.0050.01116.77
7.2.310.0110.00616.52
7.2.300.0140.00616.61
7.2.290.0040.01316.48
7.2.250.0130.00715.07
7.2.240.0070.01415.21
7.2.230.0090.00914.91
7.2.220.0060.00914.76
7.2.210.0080.00614.70
7.2.200.0050.00515.10
7.2.190.0000.01314.79
7.2.180.0070.00714.95
7.2.170.0000.01415.00
7.2.60.0080.00616.97
7.2.00.0100.00719.50
7.1.330.0030.01315.86
7.1.320.0100.00315.81
7.1.310.0100.00715.88
7.1.300.0000.01415.74
7.1.290.0060.00915.70
7.1.280.0060.00915.45
7.1.270.0060.00915.61
7.1.260.0000.01315.83
7.1.200.0090.00315.73
7.1.100.0050.00817.86
7.1.70.0040.00416.89
7.1.60.0100.01419.40
7.1.50.0130.00316.58
7.1.00.0100.06722.33
7.0.200.0000.00716.47
7.0.140.0000.07722.01
7.0.60.0000.04320.00
7.0.50.0130.05717.89
7.0.40.0270.06720.40
7.0.30.0470.05020.17
7.0.20.0370.07320.30
7.0.10.0000.06720.13
7.0.00.0000.04320.10
5.6.280.0000.07720.81
5.6.210.0130.08020.54
5.6.200.0000.09018.08
5.6.190.0070.04020.36
5.6.180.0330.07320.42
5.6.170.0130.04320.49
5.6.160.0070.08720.33
5.6.150.0030.04018.09
5.6.140.0070.05318.21
5.6.130.0070.05318.15
5.6.120.0030.06021.07
5.6.110.0030.07721.13
5.6.100.0100.06321.06
5.6.90.0100.08021.02
5.6.80.0070.07720.52
5.5.350.0000.08320.39
5.5.340.0130.07718.01
5.5.330.0070.08320.13
5.5.320.0000.05720.23
5.5.310.0330.07720.31
5.5.300.0070.07717.87
5.5.290.0030.04317.96
5.5.280.0100.06720.77
5.5.270.0130.08020.63
5.5.260.0030.04320.63
5.5.250.0030.06720.57
5.5.240.0270.07020.25
5.4.450.0430.04319.21
5.4.440.0270.05019.45
5.4.430.0330.03719.40
5.4.420.0330.04019.24
5.4.410.0400.04319.45
5.4.400.0570.04018.92
5.4.390.0100.04019.11
5.4.380.0330.05318.57
5.4.370.0400.05318.56
5.4.360.0400.04718.74
5.4.350.0430.06718.68
5.4.340.0400.05318.70
5.4.320.0030.04412.45
5.4.310.0060.04012.45
5.4.300.0030.03712.46
5.4.290.0080.04112.45
5.4.280.0090.03512.35
5.4.270.0070.03812.35
5.4.260.0060.04012.35
5.4.250.0070.03612.35
5.4.240.0070.03412.35
5.4.230.0070.04212.34
5.4.220.0070.03712.34
5.4.210.0070.03712.34
5.4.200.0060.03712.34
5.4.190.0110.03512.34
5.4.180.0040.03812.34
5.4.170.0030.03812.35
5.4.160.0060.03512.34
5.4.150.0070.04112.34
5.4.140.0040.03812.03
5.4.130.0030.04212.01
5.4.120.0120.03411.97
5.4.110.0050.03411.96
5.4.100.0050.03611.97
5.4.90.0070.03811.97
5.4.80.0070.03411.97
5.4.70.0060.03311.96
5.4.60.0080.03111.96
5.4.50.0040.03511.96
5.4.40.0060.03511.95
5.4.30.0050.03911.95
5.4.20.0070.03811.95
5.4.10.0080.03211.95
5.4.00.0060.03611.44
5.3.290.0060.04012.80
5.3.280.0070.03712.71
5.3.270.0080.03912.72
5.3.260.0050.03912.72
5.3.250.0060.04312.72
5.3.240.0080.04712.71
5.3.230.0080.03612.71
5.3.220.0080.03512.68
5.3.210.0050.03912.68
5.3.200.0050.03612.68
5.3.190.0050.04312.67
5.3.180.0030.03912.67
5.3.170.0060.04112.67
5.3.160.0060.03612.67
5.3.150.0080.04012.67
5.3.140.0040.04812.66
5.3.130.0090.03412.66
5.3.120.0060.03812.66
5.3.110.0060.04712.66
5.3.100.0080.03412.12
5.3.90.0040.04312.08
5.3.80.0070.03412.08
5.3.70.0060.03612.07
5.3.60.0120.03812.06
5.3.50.0080.03812.00
5.3.40.0030.03912.00
5.3.30.0080.03911.95
5.3.20.0030.03811.72
5.3.10.0060.03311.69
5.3.00.0080.03211.68
5.2.170.0030.0319.18
5.2.160.0040.0299.18
5.2.150.0060.0369.18
5.2.140.0070.0309.18
5.2.130.0050.0329.13
5.2.120.0070.0359.14
5.2.110.0060.0319.14
5.2.100.0070.0259.14
5.2.90.0040.0299.14
5.2.80.0030.0329.14
5.2.70.0060.0289.13
5.2.60.0050.0299.09
5.2.50.0030.0339.05
5.2.40.0050.0279.03
5.2.30.0060.0289.01
5.2.20.0050.0309.00
5.2.10.0060.0298.92
5.2.00.0070.0268.78
5.1.60.0020.0268.07
5.1.50.0060.0248.07
5.1.40.0030.0298.04
5.1.30.0030.0258.40
5.1.20.0070.0268.41
5.1.10.0070.0308.14
5.1.00.0040.0258.14
5.0.50.0050.0216.62
5.0.40.0060.0166.48
5.0.30.0030.0316.29
5.0.20.0030.0246.26
5.0.10.0000.0226.24
5.0.00.0010.0326.23
4.4.90.0050.0164.78
4.4.80.0050.0134.75
4.4.70.0020.0164.76
4.4.60.0020.0174.76
4.4.50.0040.0144.77
4.4.40.0040.0314.71
4.4.30.0030.0174.76
4.4.20.0040.0144.85
4.4.10.0030.0164.85
4.4.00.0030.0254.76
4.3.110.0030.0164.67
4.3.100.0030.0294.67
4.3.90.0060.0124.63
4.3.80.0080.0504.58
4.3.70.0090.0374.63
4.3.60.0060.0164.62
4.3.50.0090.0214.63
4.3.40.0190.0964.53
4.3.30.0060.0243.28
4.3.20.0020.0183.25
4.3.10.0040.0143.22
4.3.00.0000.02015.88

preferences:
56.08 ms | 401 KiB | 5 Q