3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $someFoo = '{ "Foo" : "Bar" }'; $someFoo = mb_convert_encoding($someFoo, 'ASCII'); echo mb_detect_encoding($someFoo); var_dump(json_decode($someFoo)); $someFoo = mb_convert_encoding($someFoo, 'UTF-8'); echo mb_detect_encoding($someFoo); var_dump(json_decode($someFoo));
based on Wn76a

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0rc40.0150.00998.97
7.3.0rc30.0050.00816.37
7.3.0beta10.0030.00612.67
7.3.0alpha10.0060.00312.59
7.2.60.0060.00916.80
7.1.200.0040.00715.70
7.1.70.0000.00717.09
7.1.60.0060.01619.40
7.1.50.0110.01417.03
7.1.00.0030.07322.31
7.0.200.0050.00316.63
7.0.140.0070.07022.12
7.0.60.0070.03720.03
7.0.50.0100.06317.82
7.0.40.0030.04320.30
7.0.30.0400.04720.17
7.0.20.0430.06320.17
7.0.10.0100.08320.09
7.0.00.0100.03720.16
5.6.280.0070.07021.14
5.6.210.0100.04020.43
5.6.200.0000.04718.17
5.6.190.0100.08020.61
5.6.180.0270.04020.59
5.6.170.0370.05020.54
5.6.160.0130.08320.46
5.6.150.0070.06018.18
5.6.140.0030.04018.12
5.6.130.0100.07718.23
5.6.120.0070.08320.98
5.6.110.0170.07021.08
5.6.100.0000.04721.00
5.6.90.0000.04720.99
5.6.80.0100.07720.46
5.5.350.0100.08320.41
5.5.340.0000.08318.02
5.5.330.0100.07020.21
5.5.320.3270.04320.34
5.5.310.0270.08320.20
5.5.300.0030.04017.88
5.5.290.0100.08318.00
5.5.280.0100.08020.64
5.5.270.0030.05720.88
5.5.260.0070.08720.67
5.5.250.0030.04020.65
5.5.240.0070.07320.18
5.4.450.0270.06019.52
5.4.440.0870.08719.22
5.4.430.0300.03719.25
5.4.420.0070.06019.33
5.4.410.0170.05018.80
5.4.400.0130.05018.60
5.4.390.0270.05318.60
5.4.380.0170.05318.44
5.4.370.0170.04318.68
5.4.360.0230.04718.70
5.4.350.0060.04711.98
5.4.340.0080.03711.97
5.4.320.0050.03812.45
5.4.310.0100.04812.45
5.4.300.0060.04212.46
5.4.290.0050.04412.45
5.4.280.0150.03312.35
5.4.270.0130.03512.35
5.4.260.0090.05812.35
5.4.250.0060.05112.35
5.4.240.0050.03912.35
5.4.230.0090.03512.34
5.4.220.0050.03712.34
5.4.210.0080.03312.34
5.4.200.0040.03912.34
5.4.190.0110.04912.34
5.4.180.0100.05312.34
5.4.170.0050.03612.35
5.4.160.0090.03212.34
5.4.150.0070.03412.34
5.4.140.0110.03712.02
5.4.130.0100.03512.02
5.4.120.0080.04011.97
5.4.110.0070.04111.97
5.4.100.0130.03311.97
5.4.90.0040.03911.97
5.4.80.0060.03511.96
5.4.70.0060.03411.96
5.4.60.0060.03511.96
5.4.50.0060.03411.96
5.4.40.0070.03211.95
5.4.30.0050.03711.95
5.4.20.0040.03711.95
5.4.10.0090.03211.95
5.4.00.0040.03711.44
5.3.290.0120.03512.80
5.3.280.0060.03712.71
5.3.270.0090.03612.72
5.3.260.0070.04212.72
5.3.250.0070.03612.72
5.3.240.0080.03412.72
5.3.230.0030.04012.71
5.3.220.0090.04112.68
5.3.210.0120.04712.68
5.3.200.0070.04312.68
5.3.190.0050.03912.68
5.3.180.0060.03612.68
5.3.170.0040.03812.67
5.3.160.0050.03912.68
5.3.150.0060.04012.67
5.3.140.0050.03712.66
5.3.130.0070.04112.65
5.3.120.0060.03912.66
5.3.110.0060.03812.66
5.3.100.0050.03812.12
5.3.90.0050.03712.08
5.3.80.0060.03612.08
5.3.70.0050.03812.07
5.3.60.0030.03912.06
5.3.50.0040.03812.00
5.3.40.0060.04012.00
5.3.30.0040.03911.95
5.3.20.0080.03311.73
5.3.10.0020.03911.70
5.3.00.0090.03211.68
5.2.170.0100.0249.18
5.2.160.0120.0219.18
5.2.150.0100.0259.18
5.2.140.0080.0289.17
5.2.130.0090.0269.14
5.2.120.0070.0289.14
5.2.110.0070.0309.14
5.2.100.0060.0349.14
5.2.90.0050.0299.14
5.2.80.0060.0299.13
5.2.70.0080.0279.13
5.2.60.0060.0289.09
5.2.50.0040.0309.05
5.2.40.0050.0289.04
5.2.30.0020.0319.01
5.2.20.0050.0289.00
5.2.10.0070.0268.92
5.2.00.0050.0288.78
5.1.60.0070.0208.06
5.1.50.0050.0238.06
5.1.40.0060.0228.04
5.1.30.0060.0238.40
5.1.20.0020.0288.41
5.1.10.0070.0228.14
5.1.00.0050.0258.14
5.0.50.0040.0206.62
5.0.40.0020.0206.48
5.0.30.0040.0316.29
5.0.20.0060.0166.26
5.0.10.0040.0196.24
5.0.00.0060.0286.23
4.4.90.0010.0164.77
4.4.80.0010.0164.75
4.4.70.0040.0144.75
4.4.60.0010.0164.75
4.4.50.0010.0174.77
4.4.40.0020.0274.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0070.0134.84
4.4.00.0020.0264.76
4.3.110.0020.0184.67
4.3.100.0020.0164.67
4.3.90.0030.0154.63
4.3.80.0020.0264.58
4.3.70.0040.0144.63
4.3.60.0030.0164.63
4.3.50.0020.0174.63
4.3.40.0030.0244.54
4.3.30.0030.0183.28
4.3.20.0020.0163.26
4.3.10.0020.0163.22
4.3.00.0100.0236.99