3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-type: text/html; charset=utf-8'); echo '<br />百度关键词URL编码转换示例:<br />'; $urlBaidu = 'http://www.baidu.com/s?wd=%D6%D0%CE%C4'; $arrParse = parse_url($urlBaidu); var_dump($arrParse); parse_str($arrParse ['query'],$output); var_dump($output); echo '乱码:' . $output['wd'] . '<br />'; //将gb2312编码转换成utf-8编码 $strUTF8 = mb_convert_encoding($output['wd'], 'utf-8', 'gb2312'); echo '可读码:' . $strUTF8 . '<br />'; echo '<br />谷歌关键词URL编码转换示例:<br />'; $urlGoogle = 'http://www.google.cn/search?hl=zh-CN&source=hp&q=%E4%B8%AD%E6%96%87&aq=f&oq='; $arrParse = parse_url($urlGoogle); var_dump($arrParse); parse_str($arrParse ['query'],$output); var_dump($output); //谷歌关键词URL编码是utf-8,不用再作转换 echo '可读码:' . $output['q'] . '<br />';

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.0150.00018.92
8.3.30.0130.00320.34
8.3.20.0080.00020.29
8.3.10.0060.00321.92
8.3.00.0040.00422.52
8.2.170.0040.01119.22
8.2.160.0180.00022.96
8.2.150.0030.00625.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00420.92
8.2.110.0000.00922.33
8.2.100.0030.00719.44
8.2.90.0080.00019.82
8.2.80.0090.00018.18
8.2.70.0000.01018.05
8.2.60.0060.00318.41
8.2.50.0050.00518.10
8.2.40.0040.00420.66
8.2.30.0040.00419.62
8.2.20.0040.00417.84
8.2.10.0000.00818.04
8.2.00.0090.00017.99
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0070.00728.09
8.1.240.0030.00620.60
8.1.230.0070.00422.80
8.1.220.0060.00319.23
8.1.210.0100.00218.88
8.1.200.0030.00617.61
8.1.190.0090.00317.47
8.1.180.0000.00818.10
8.1.170.0080.00018.90
8.1.160.0040.00419.11
8.1.150.0070.00218.75
8.1.140.0060.00317.65
8.1.130.0000.00717.96
8.1.120.0030.00517.72
8.1.110.0000.00717.53
8.1.100.0000.00917.70
8.1.90.0040.00417.73
8.1.80.0000.00717.63
8.1.70.0030.00317.61
8.1.60.0030.00717.74
8.1.50.0060.00317.59
8.1.40.0000.00817.62
8.1.30.0040.00417.83
8.1.20.0060.00317.68
8.1.10.0040.00417.70
8.1.00.0070.00217.71
8.0.300.0040.00421.64
8.0.290.0070.00016.88
8.0.280.0000.00818.54
8.0.270.0040.00417.26
8.0.260.0000.00816.97
8.0.250.0000.00716.95
8.0.240.0030.00616.97
8.0.230.0000.00816.94
8.0.220.0000.00716.92
8.0.210.0000.00717.01
8.0.200.0030.00517.05
8.0.190.0040.00416.96
8.0.180.0060.00316.96
8.0.170.0000.00816.93
8.0.160.0070.00017.07
8.0.150.0040.00416.96
8.0.140.0070.00317.00
8.0.130.0030.00313.48
8.0.120.0050.00316.91
8.0.110.0040.00417.00
8.0.100.0040.00416.88
8.0.90.0080.00016.82
8.0.80.0120.00316.95
8.0.70.0080.00016.97
8.0.60.0050.00316.82
8.0.50.0000.00816.97
8.0.30.0100.00717.47
8.0.20.0120.00717.47
8.0.10.0040.00416.93
8.0.00.0100.01016.90
7.4.330.0040.00315.00
7.4.320.0070.00016.72
7.4.300.0000.00616.64
7.4.290.0050.00216.73
7.4.280.0040.00416.73
7.4.270.0030.00616.64
7.4.260.0000.00513.44
7.4.250.0040.00416.67
7.4.240.0020.00516.73
7.4.230.0040.00416.82
7.4.220.0140.00916.64
7.4.210.0060.01016.67
7.4.200.0070.00016.73
7.4.190.0030.00316.59
7.4.160.0040.01216.68
7.4.150.0100.01017.40
7.4.140.0280.01917.86
7.4.130.0070.01116.66
7.4.120.0150.00316.78
7.4.110.0000.01716.56
7.4.100.0100.00716.52
7.4.90.0070.01316.70
7.4.80.0070.01119.39
7.4.70.0130.01416.67
7.4.60.0110.00616.52
7.4.50.0080.00016.44
7.4.40.0040.01122.77
7.4.30.0200.00416.86
7.4.00.0060.00614.95
7.3.330.0060.00013.29
7.3.320.0050.00013.14
7.3.310.0030.00316.53
7.3.300.0030.00316.46
7.3.290.0070.00916.34
7.3.280.0070.01116.36
7.3.270.0090.01317.40
7.3.260.0070.01016.64
7.3.250.0120.00616.52
7.3.240.0040.01416.56
7.3.230.0070.01116.54
7.3.210.0150.00616.60
7.3.200.0140.00719.39
7.3.190.0080.01116.49
7.3.180.0060.01216.48
7.3.170.0060.01016.60
7.3.160.0070.01016.46
7.3.120.0080.00814.88
7.3.00.0090.00316.86
7.2.330.0120.00916.78
7.2.320.0160.01016.67
7.2.310.0150.00316.77
7.2.300.0030.01316.63
7.2.290.0130.01316.93
7.2.130.0030.01017.18
7.2.120.0100.00317.07
7.2.110.0000.01216.96
7.2.100.0060.00617.12
7.2.90.0000.00917.14
7.2.80.0100.00317.09
7.2.70.0040.00817.26
7.2.60.0020.00916.97
7.2.50.0080.00417.22
7.2.40.0000.01017.07
7.2.30.0060.00617.11
7.2.20.0060.00617.04
7.2.10.0090.00616.86
7.2.00.0000.01418.39
7.1.250.0100.00015.73
7.1.240.0030.00616.08
7.1.230.0070.00315.71
7.1.220.0100.00316.18
7.1.210.0090.00615.84
7.1.200.0030.00716.01
7.1.190.0030.00716.06
7.1.180.0030.00916.14
7.1.170.0040.00415.97
7.1.160.0070.00716.13
7.1.150.0000.00815.84
7.1.140.0100.00716.23
7.1.130.0090.00316.01
7.1.120.0040.00416.08
7.1.110.0030.01015.89
7.1.100.0050.00916.90
7.1.90.0070.00716.03
7.1.80.0090.00315.89
7.1.70.0020.01016.57
7.1.60.0060.00717.64
7.1.50.0020.01616.63
7.1.40.0110.00415.84
7.1.30.0000.01716.16
7.1.20.0060.00316.02
7.1.10.0060.00615.87
7.1.00.0120.01719.21
7.0.330.0060.00315.80
7.0.320.0030.00715.71
7.0.310.0080.00315.70
7.0.300.0070.00315.61
7.0.290.0090.00315.64
7.0.280.0030.00715.65
7.0.270.0040.00415.58
7.0.260.0000.01415.51
7.0.250.0070.00715.50
7.0.240.0030.00715.72
7.0.230.0030.01015.64
7.0.220.0040.00815.67
7.0.210.0060.00315.65
7.0.200.0020.00616.40
7.0.190.0060.00315.57
7.0.180.0060.00715.35
7.0.170.0080.00015.56
7.0.160.0030.01015.68
7.0.150.0030.00615.82
7.0.140.0070.03918.77
7.0.130.0000.01315.73
7.0.120.0070.00415.67
7.0.110.0060.00915.66
7.0.100.0000.00915.59
7.0.90.0000.01015.52
7.0.80.0040.00815.86
7.0.70.0030.02318.67
7.0.60.0000.02618.81
7.0.50.0060.02818.89
7.0.40.0080.02516.83
7.0.30.0030.03216.91
7.0.20.0000.02616.86
7.0.10.0020.02416.79
7.0.00.0090.01816.73
5.6.380.0030.00914.43
5.6.370.0030.00814.40
5.6.360.0040.00714.53
5.6.350.0060.00914.60
5.6.340.0030.00714.73
5.6.330.0040.00914.59
5.6.320.0100.00314.62
5.6.310.0040.00814.37
5.6.300.0030.01014.35
5.6.290.0050.00514.84
5.6.280.0010.04317.81
5.6.270.0040.00714.40
5.6.260.0000.00914.65
5.6.250.0080.00314.82
5.6.240.0030.00914.63
5.6.230.0030.00614.76
5.6.220.0080.02017.53
5.6.210.0030.03017.51
5.6.200.0070.03817.79
5.6.190.0080.03817.79
5.6.180.0020.02717.88
5.6.170.0050.02617.56
5.6.160.0020.02517.60
5.6.150.0040.02117.89
5.6.140.0050.01917.72
5.6.130.0020.02517.70
5.6.120.0040.02317.96
5.6.110.0090.03017.90
5.6.100.0020.02817.75
5.6.90.0050.02117.79
5.6.80.0020.02517.43
5.6.70.0040.02217.52
5.6.60.0020.02417.43
5.6.50.0020.03217.50
5.6.40.0030.04717.51
5.6.30.0060.04017.41
5.6.20.0070.04117.46
5.6.10.0070.02817.29
5.6.00.0070.03817.37
5.5.380.0000.01111.18
5.5.370.0030.00611.40
5.5.360.0020.02615.80
5.5.350.0080.03515.96
5.5.340.0020.02515.99
5.5.330.0050.03316.05
5.5.320.0000.02616.07
5.5.310.0030.02316.20
5.5.300.0050.01815.96
5.5.290.0020.02116.13
5.5.280.0030.01916.04
5.5.270.0030.02216.06
5.5.260.0030.02316.11
5.5.250.0030.01915.91
5.5.240.0000.02615.74
5.5.230.0040.02215.69
5.5.220.0040.02215.69
5.5.210.0000.02615.64
5.5.200.0050.03915.71
5.5.190.0070.02715.68
5.5.180.0050.02215.85
5.5.170.0040.00811.37
5.5.160.0030.04215.74
5.5.150.0020.04515.65
5.5.140.0030.03815.72
5.5.130.0030.04815.63
5.5.120.0020.02415.78
5.5.110.0050.04315.62
5.5.100.0060.04115.64
5.5.90.0050.04015.71
5.5.80.0080.04115.73
5.5.70.0050.03915.62
5.5.60.0020.03915.66
5.5.50.0020.02815.63
5.5.40.0140.03215.71
5.5.30.0000.04315.56
5.5.20.0050.04315.61
5.5.10.0030.04415.72
5.5.00.0030.02815.70
5.4.450.0000.02515.34
5.4.440.0030.02815.34
5.4.430.0090.01715.28
5.4.420.0020.02315.30
5.4.410.0020.02215.38
5.4.400.0000.02615.15
5.4.390.0050.03815.16
5.4.380.0040.02015.20
5.4.370.0030.02115.10
5.4.360.0100.03715.10
5.4.350.0080.03815.09
5.4.340.0030.04515.19
5.4.330.0000.01211.18
5.4.320.0030.04015.06
5.4.310.0050.02215.13
5.4.300.0050.04515.13
5.4.290.0050.02815.03
5.4.280.0130.01815.12
5.4.270.0070.03515.11
5.4.260.0080.03315.22
5.4.250.0050.04215.11
5.4.240.0080.03815.16
5.4.230.0000.03415.19
5.4.220.0050.04215.07
5.4.210.0060.02815.18
5.4.200.0040.03515.16
5.4.190.0050.03815.13
5.4.180.0060.03114.98
5.4.170.0050.04015.11
5.4.160.0020.04614.98
5.4.150.0050.03515.12
5.4.140.0060.03513.70
5.4.130.0050.03713.71
5.4.120.0020.03413.83
5.4.110.0030.04213.70
5.4.100.0000.04013.75
5.4.90.0070.03713.73
5.4.80.0050.04013.78
5.4.70.0050.03713.73
5.4.60.0040.03613.72
5.4.50.0090.03313.68
5.4.40.0030.02313.77
5.4.30.0030.03613.71
5.4.20.0050.03813.76
5.4.10.0030.04313.77
5.4.00.0110.03613.50
5.3.290.0020.02912.85
5.3.280.0050.02012.88
5.3.270.0000.04212.89
5.3.260.0010.04112.82
5.3.250.0030.03612.82
5.3.240.0040.02812.82
5.3.230.0000.03212.87
5.3.220.0020.03312.84
5.3.210.0030.04212.80
5.3.200.0050.04312.86
5.3.190.0080.03012.85
5.3.180.0030.03012.86
5.3.170.0050.03712.79
5.3.160.0050.03812.85
5.3.150.0020.04212.82
5.3.140.0020.03012.84
5.3.130.0020.04212.80
5.3.120.0010.03612.84
5.3.110.0050.03812.84
5.3.100.0050.03512.60
5.3.90.0080.03612.59
5.3.80.0030.04112.52
5.3.70.0020.04312.56
5.3.60.0030.03112.54
5.3.50.0060.02312.56
5.3.40.0030.03112.55
5.3.30.0030.03512.42
5.3.20.0020.03812.40
5.3.10.0040.03712.30
5.3.00.0030.03812.37
5.2.170.0000.03411.79
5.2.160.0000.02311.79
5.2.150.0030.03511.79
5.2.140.0030.03511.79
5.2.130.0000.03611.79
5.2.120.0000.03511.79
5.2.110.0020.03311.79
5.2.100.0020.02211.79
5.2.90.0030.03111.79
5.2.80.0060.03011.79
5.2.70.0030.02511.79
5.2.60.0020.03511.79
5.2.50.0030.01811.79
5.2.40.0050.02811.79
5.2.30.0090.03011.79
5.2.20.0020.02011.79
5.2.10.0030.03211.79
5.2.00.0060.02211.79
5.1.60.0040.02811.79
5.1.50.0050.02911.79
5.1.40.0020.03011.79
5.1.30.0040.03011.79
5.1.20.0050.03111.79
5.1.10.0020.02611.79
5.1.00.0020.03111.79
5.0.50.0000.02611.79
5.0.40.0030.02711.79
5.0.30.0020.03511.79
5.0.20.0050.02211.79
5.0.10.0050.02011.79
5.0.00.0020.03311.79
4.4.90.0020.01411.79
4.4.80.0000.01511.79
4.4.70.0000.02011.79
4.4.60.0000.02111.79
4.4.50.0030.01911.79
4.4.40.0010.02511.79
4.4.30.0020.01911.79
4.4.20.0020.02011.79
4.4.10.0020.01411.79
4.4.00.0020.02411.79
4.3.110.0030.01911.79
4.3.100.0020.01711.79
4.3.90.0070.01711.79
4.3.80.0050.02511.79
4.3.70.0020.01211.79
4.3.60.0060.00711.79
4.3.50.0020.01011.79
4.3.40.0030.02611.79
4.3.30.0030.01811.79
4.3.20.0000.02211.79
4.3.10.0020.02211.79
4.3.00.0040.01711.79

preferences:
47.07 ms | 400 KiB | 5 Q