3v4l.org

run code in 300+ PHP versions simultaneously
<?php $STRING = "1&nbsp;2"; var_dump( htmlentities($STRING, ENT_QUOTES, ini_get('default_charset'), false), filter_var($STRING, FILTER_SANITIZE_FULL_SPECIAL_CHARS) );

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.0130.00916.63
8.3.50.0100.00716.33
8.3.40.0070.00718.57
8.3.30.0110.00418.67
8.3.20.0000.00724.18
8.3.10.0070.00024.66
8.3.00.0070.00026.16
8.2.180.0030.01525.92
8.2.170.0170.00318.94
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0070.00020.63
8.2.110.0110.00021.05
8.2.100.0040.00717.71
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0030.00617.38
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0000.01117.97
8.2.30.0000.00717.95
8.2.20.0000.00718.05
8.2.10.0070.00019.18
8.2.00.0050.00319.06
8.1.280.0100.00725.92
8.1.270.0030.00522.20
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00623.89
8.1.230.0000.01117.45
8.1.220.0050.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0060.00317.23
8.1.180.0070.00318.10
8.1.170.0000.00818.47
8.1.160.0030.00318.92
8.1.150.0040.00418.87
8.1.140.0000.00718.70
8.1.130.0000.00720.13
8.1.120.0000.00817.32
8.1.110.0030.00517.36
8.1.100.0040.00417.38
8.1.90.0070.00017.44
8.1.80.0030.00617.29
8.1.70.0000.00717.30
8.1.60.0040.00417.50
8.1.50.0030.00617.29
8.1.40.0040.00417.46
8.1.30.0030.00617.61
8.1.20.0000.00817.46
8.1.10.0000.00817.41
8.1.00.0070.00317.36
8.0.300.0030.00618.77
8.0.290.0070.00016.75
8.0.280.0070.00018.50
8.0.270.0030.00317.94
8.0.260.0030.00318.52
8.0.250.0070.00016.86
8.0.240.0040.00416.88
8.0.230.0000.00716.93
8.0.220.0080.00016.87
8.0.210.0070.00016.70
8.0.200.0000.00616.78
8.0.190.0000.00716.88
8.0.180.0070.00016.89
8.0.170.0050.00316.87
8.0.160.0060.00316.73
8.0.150.0000.00816.74
8.0.140.0070.00316.84
8.0.130.0000.00613.29
8.0.120.0070.00016.83
8.0.110.0000.00716.89
8.0.100.0030.00316.79
8.0.90.0000.00716.66
8.0.80.0100.00516.76
8.0.70.0000.00816.85
8.0.60.0000.00816.73
8.0.50.0040.00416.62
8.0.30.0100.00716.69
8.0.20.0260.01516.77
8.0.10.0190.01416.86
8.0.00.0220.00716.84
7.4.330.0030.00315.55
7.4.320.0060.00016.53
7.4.300.0030.00316.54
7.4.290.0000.00816.37
7.4.280.0000.01116.35
7.4.270.0080.00016.59
7.4.260.0050.00013.23
7.4.250.0040.00416.50
7.4.240.0040.00316.39
7.4.230.0040.00316.45
7.4.220.0030.00316.44
7.4.210.0030.01016.61
7.4.200.0000.00816.38
7.4.160.0250.00716.54
7.4.150.0210.00916.34
7.4.140.0190.01116.40
7.4.130.0240.00316.28
7.4.120.0100.02116.29
7.4.110.0210.01016.25
7.4.100.0200.00716.39
7.4.90.0150.01316.50
7.4.80.0240.00916.19
7.4.70.0200.01216.11
7.4.60.0220.00616.17
7.4.50.0210.00616.03
7.4.40.0200.01016.20
7.4.30.0160.01316.28
7.4.20.0210.01116.28
7.4.10.0180.01216.31
7.4.00.0310.00616.34
7.3.330.0060.00416.21
7.3.320.0050.00012.98
7.3.310.0000.00716.28
7.3.300.0030.00316.19
7.3.290.0070.00916.13
7.3.280.0260.00616.11
7.3.270.0220.00616.06
7.3.260.0270.00916.08
7.3.250.0190.00816.02
7.3.240.0230.00916.11
7.3.230.0140.01416.06
7.3.220.0210.01316.05
7.3.210.0280.00916.07
7.3.200.0230.00715.96
7.3.190.0180.01515.99
7.3.180.0270.00515.95
7.3.170.0240.00816.00
7.3.160.0250.01316.04
7.3.150.0190.01416.14
7.3.140.0240.00915.95
7.3.130.0260.00715.98
7.3.120.0260.00716.05
7.3.110.0170.01715.93
7.3.100.0320.00615.90
7.3.90.0210.01316.22
7.3.80.0240.00715.96
7.3.70.0260.00316.10
7.3.60.0190.00816.23
7.3.50.0150.01516.13
7.3.40.0260.01116.23
7.3.30.0300.00616.17
7.3.20.0390.00616.25
7.3.10.0220.01016.16
7.3.00.0270.00616.20

preferences:
67.13 ms | 400 KiB | 5 Q