3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = html_entity_decode('ABC&nbsp;'); $b = 'ABC '; echo 'Length with trim and nbsp: '.strlen(trim($a)).PHP_EOL; echo 'Length with trim and space: '.strlen(trim($b)).PHP_EOL; echo 'Length with mb_trim and nbsp: '.strlen(mb_trim($a)).PHP_EOL; echo 'Length with mb_trim and space: '.strlen(mb_trim($b)).PHP_EOL;

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.4.120.0130.00724.30
8.4.110.0140.00617.85
8.4.100.0160.00517.64
8.4.90.0090.00817.69
8.4.80.0120.00819.27
8.4.70.0110.01017.55
8.4.60.0110.01017.63
8.4.50.0310.00817.67
8.4.40.0380.01317.37
8.4.30.0480.00517.32
8.4.20.0370.00917.88
8.4.10.0370.00717.49
8.3.250.0100.00918.71
8.3.240.0080.01117.16
8.3.230.0090.01016.83
8.3.220.0120.00718.71
8.3.210.0090.01016.66
8.3.200.0120.00716.71
8.3.190.0430.00516.42
8.3.180.0380.01116.65
8.3.170.0430.01016.25
8.3.160.0400.00716.72
8.3.150.0400.00716.27
8.3.140.0350.01316.35
8.3.130.0360.00816.37
8.3.120.0330.00916.62
8.3.110.0260.01516.32
8.3.100.0410.00616.55
8.3.90.0380.00916.57
8.3.80.0330.01516.38
8.3.70.0380.00916.52
8.3.60.0390.00816.49
8.3.50.0370.00916.57
8.3.40.0390.00717.45
8.3.30.0330.00917.58
8.3.20.0320.00717.35
8.3.10.0250.01017.75
8.3.00.0220.00617.35
8.2.290.0060.00219.16
8.2.280.0300.00816.69
8.2.270.0350.00716.68
8.2.260.0290.00816.34
8.2.250.0310.00916.59
8.2.240.0340.00616.54
8.2.230.0340.00616.50
8.2.220.0330.00916.69
8.2.210.0320.00616.38
8.2.200.0300.00716.63
8.2.190.0360.01116.36
8.2.180.0330.01016.37
8.2.170.0290.00417.88
8.2.160.0420.00617.61
8.2.150.0340.00717.75
8.2.140.0270.00717.64
8.2.130.0300.00717.61
8.2.120.0320.00617.77
8.2.110.0330.00917.72
8.2.100.0340.00717.57
8.2.90.0360.00717.74
8.2.80.0340.00717.44
8.2.70.0330.00817.50
8.2.60.0270.00517.61
8.2.50.0260.00317.58
8.2.40.0310.01317.41
8.2.30.0280.01117.34
8.2.20.0310.00817.51
8.2.10.0230.01517.44
8.2.00.0320.00617.74

preferences:
38.22 ms | 403 KiB | 5 Q