3v4l.org

run code in 300+ PHP versions simultaneously
<?php function safehtml ($str) { if (isset($GLOBALS['encoding'])) { $encoding = $GLOBALS['encoding']; } else { $encoding = 'ISO-8859-1'; } if (defined("ENT_XHTML")) { $newstr = htmlentities($str, ENT_COMPAT | ENT_XHTML, $encoding); // FIND-PHP-IGNORE-LINE-P$ } else { $newstr = htmlentities($str, ENT_COMPAT, $encoding); // FIND-PHP-IGNORE-LINE-PAUL } if (strlen($str) !== 0 && strlen($newstr) === 0) { trigger_error('safehtml returned blank string. Input: "'.$str.'"'); } return $newstr; } echo safehtml('';!--"<XSS>=&{()}); ?>

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)
5.4.310.0070.04012.51
5.4.300.0070.04112.52
5.4.290.0050.04312.51
5.4.280.0070.04312.41
5.4.270.0060.03812.41
5.4.260.0070.04012.41
5.4.250.0090.04512.41
5.4.240.0100.04512.41
5.4.230.0070.04312.41
5.4.220.0070.04212.40
5.4.210.0090.03912.41
5.4.200.0080.03612.40
5.4.190.0070.03812.40
5.4.180.0070.04312.40
5.4.170.0040.03912.40
5.4.160.0090.04012.40
5.4.150.0090.04212.40
5.4.140.0060.03812.09
5.4.130.0060.03812.07
5.4.120.0080.04212.03
5.4.110.0050.04212.03
5.4.100.0080.03912.03
5.4.90.0070.04512.03
5.4.80.0070.04112.04
5.4.70.0090.03412.03
5.4.60.0070.04112.03
5.4.50.0070.03912.02
5.4.40.0090.03212.02
5.4.30.0060.04512.01
5.4.20.0080.03612.01
5.4.10.0070.03712.01
5.4.00.0070.03811.50
5.3.280.0080.04712.71
5.3.270.0080.04612.72
5.3.260.0080.04312.72
5.3.250.0060.04312.72
5.3.240.0070.04212.72
5.3.230.0080.03812.71
5.3.220.0040.04112.68
5.3.210.0080.03912.68
5.3.200.0050.03812.68
5.3.190.0070.03912.68
5.3.180.0040.03912.67
5.3.170.0070.04112.67
5.3.160.0040.03912.67
5.3.150.0070.04112.67
5.3.140.0070.04412.66
5.3.130.0050.04412.66
5.3.120.0070.04312.66
5.3.110.0070.04212.66
5.3.100.0040.05012.12
5.3.90.0040.04212.10
5.3.80.0060.03812.09
5.3.70.0060.03812.09
5.3.60.0050.03812.08
5.3.50.0070.03612.03
5.3.40.0080.03612.03
5.3.30.0090.03811.98
5.3.20.0090.03811.77
5.3.10.0080.03911.73
5.3.00.0050.04111.71
5.2.170.0050.0339.22
5.2.160.0050.0309.22
5.2.150.0050.0329.22
5.2.140.0050.0329.22
5.2.130.0060.0319.18
5.2.120.0040.0359.17
5.2.110.0060.0359.18
5.2.100.0050.0309.18
5.2.90.0030.0339.18
5.2.80.0040.0349.18
5.2.70.0040.0329.18
5.2.60.0040.0319.13
5.2.50.0040.0399.10
5.2.40.0090.0359.07
5.2.30.0050.0359.05
5.2.20.0050.0329.04
5.2.10.0050.0318.95
5.2.00.0050.0318.81
5.1.60.0040.0278.09
5.1.50.0050.0278.09
5.1.40.0050.0298.07
5.1.30.0070.0308.43
5.1.20.0060.0288.44
5.1.10.0070.0258.16
5.1.00.0050.0318.16
5.0.50.0040.0206.65
5.0.40.0020.0256.51
5.0.30.0040.0386.31
5.0.20.0070.0256.28
5.0.10.0020.0276.27
5.0.00.0050.0346.26
4.4.90.0030.0164.78
4.4.80.0040.0204.76
4.4.70.0020.0204.76
4.4.60.0020.0194.76
4.4.50.0040.0154.77
4.4.40.0030.0274.71
4.4.30.0030.0234.76
4.4.20.0030.0174.84
4.4.10.0040.0154.85
4.4.00.0040.0324.76
4.3.110.0020.0164.67
4.3.100.0020.0204.67
4.3.90.0030.0194.63
4.3.80.0040.0274.59
4.3.70.0020.0184.63
4.3.60.0020.0164.63
4.3.50.0040.0184.62
4.3.40.0040.0274.53
4.3.30.0020.0183.30
4.3.20.0010.0173.28
4.3.10.0020.0173.25
4.3.00.0000.01715.90

preferences:
135.46 ms | 1394 KiB | 7 Q