3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ' 0 '; $x = str_replace(' ', '', $string) != ''; $y = trim($string) != ''; $z = trim($string) ? true : false; $z1 = empty(trim($string)); var_dump([$x, $y, $z, $z1]);

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.5.00.0120.00919.85
8.4.150.0020.00014.05
8.4.140.0150.00617.40
8.4.130.0130.00718.06
8.4.120.0110.00820.47
8.4.110.0070.00620.68
8.4.100.0100.00717.77
8.4.90.0160.00420.21
8.4.80.0050.00318.62
8.4.70.0110.00918.70
8.4.60.0060.00520.75
8.4.50.0120.00518.63
8.4.40.0070.00417.47
8.4.30.0030.01722.35
8.4.20.0060.01317.88
8.4.10.0070.00319.70
8.3.280.0020.00014.05
8.3.270.0130.00616.54
8.3.260.0120.00716.62
8.3.250.0120.00618.97
8.3.240.0150.00416.39
8.3.230.0120.00616.44
8.3.220.0040.00418.80
8.3.210.0110.00716.59
8.3.200.0050.00416.44
8.3.190.0050.00317.21
8.3.180.0040.00418.83
8.3.170.0060.01217.23
8.3.160.0090.00016.73
8.3.150.0070.01316.46
8.3.140.0080.00016.54
8.3.130.0040.00418.31
8.3.120.0100.00018.71
8.3.110.0080.00018.43
8.3.100.0090.00624.06
8.3.90.0080.00026.77
8.3.80.0060.00319.36
8.3.70.0110.01016.60
8.3.60.0190.00916.53
8.3.50.0070.01116.66
8.3.40.0200.01019.39
8.3.30.0190.00518.21
8.3.20.0130.00620.59
8.3.10.0160.00420.89
8.3.00.0140.00521.64
8.2.290.0050.00316.79
8.2.280.0130.00720.15
8.2.270.0030.01418.41
8.2.260.0070.01117.25
8.2.250.0080.00016.71
8.2.240.0030.00617.13
8.2.230.0030.01220.94
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0250.01116.58
8.2.180.0170.00617.52
8.2.170.0140.00918.11
8.2.160.0220.00720.17
8.2.150.0210.00221.52
8.2.140.0130.00820.96
8.2.130.0170.00521.77
8.2.120.0180.00519.27
8.2.110.0210.00219.77
8.2.100.0280.00517.78
8.2.90.0320.00517.89
8.2.80.0280.00517.85
8.2.70.0230.01017.78
8.2.60.0290.00317.90
8.2.50.0240.00717.85
8.2.40.0210.00617.91
8.2.30.0220.00717.89
8.2.20.0230.00617.97
8.2.10.0200.01017.85
8.2.00.0240.00618.02
8.1.330.0110.00716.28
8.1.320.0080.01117.78
8.1.310.0090.00618.44
8.1.300.0000.00918.37
8.1.290.0110.00330.84
8.1.280.0200.00521.25
8.1.270.0170.00420.89
8.1.260.0130.00721.86
8.1.250.0180.00322.60
8.1.240.0160.00418.22
8.1.230.0170.00617.95
8.1.220.0280.00317.78
8.1.210.0240.00717.72
8.1.200.0260.00517.72
8.1.190.0250.00617.66
8.1.180.0260.00317.66
8.1.170.0280.00417.66
8.1.160.0210.01217.77
8.1.150.0320.00217.71
8.1.140.0230.00717.65
8.1.130.0240.00717.78
8.1.120.0230.00917.66
8.1.110.0220.00917.66
8.1.100.0250.00717.72
8.1.90.0260.00617.78
8.1.80.0240.00517.91
8.1.70.0130.01518.60
8.1.60.0240.00517.72
8.1.50.0240.00617.91
8.1.40.0240.00717.89
8.1.30.0270.00517.91
8.1.20.0240.00717.91
8.1.10.0220.00718.54
8.1.00.0230.00717.71
8.0.300.0280.00517.51
8.0.290.0220.00817.51
8.0.280.0240.00617.51
8.0.270.0220.00717.51
8.0.260.0230.00617.51
8.0.250.0220.00517.51
8.0.240.0210.00517.52
8.0.230.0270.00117.51
8.0.220.0230.00617.51
8.0.210.0280.00517.51
8.0.200.0200.00817.51
8.0.190.0230.00617.51
8.0.180.0240.00417.53
8.0.170.0220.00817.51
8.0.160.0230.00817.51
8.0.150.0220.00717.51
8.0.140.0200.00717.51
8.0.130.0240.00517.51
8.0.120.0200.00717.51
8.0.110.0220.00517.51
8.0.100.0240.00617.51
8.0.90.0250.00317.51
8.0.80.0240.00617.51
8.0.70.0230.00417.51
8.0.60.0190.00717.51
8.0.50.0190.00717.51
8.0.30.0220.00617.51
8.0.20.0310.00517.53
8.0.10.0310.00317.51

preferences:
84.91 ms | 403 KiB | 5 Q