3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trimo( string $string, string $additionalTrimChars = '' ): string { return trim(trim($string, $additionalTrimChars)); } $key = ' = hasen'; $add = '='; var_dump(trim($key)); var_dump(trim($key, $add)); var_dump(trim(trim($key, $add)));

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.50
8.3.50.0090.00616.57
8.3.40.0040.01118.48
8.3.30.0120.00318.57
8.3.20.0000.00720.27
8.3.10.0080.00023.48
8.3.00.0000.00818.88
8.2.180.0070.00716.38
8.2.170.0070.00722.96
8.2.160.0100.00320.57
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00019.37
8.2.120.0040.00426.35
8.2.110.0090.00021.03
8.2.100.0120.00017.84
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0000.00818.10
8.2.40.0040.00420.42
8.2.30.0000.00920.87
8.2.20.0070.00017.93
8.2.10.0030.00518.00
8.2.00.0000.00817.97
8.1.280.0150.00325.92
8.1.270.0040.00422.20
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00020.96
8.1.230.0040.00819.61
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0060.00617.23
8.1.190.0030.00917.22
8.1.180.0060.00318.10
8.1.170.0040.00418.48
8.1.160.0030.00318.95
8.1.150.0040.00418.86
8.1.140.0040.00419.56
8.1.130.0030.00518.83
8.1.120.0000.00817.37
8.1.110.0000.00817.39
8.1.100.0000.00817.41
8.1.90.0040.00717.46
8.1.80.0040.00417.41
8.1.70.0070.00017.39
8.1.60.0000.00817.45
8.1.50.0000.00817.34
8.1.40.0050.00317.48
8.1.30.0090.00017.52
8.1.20.0080.00417.61
8.1.10.0050.00317.47
8.1.00.0080.00017.38
8.0.300.0000.00818.77
8.0.290.0000.00716.58
8.0.280.0040.00418.39
8.0.270.0040.00417.21
8.0.260.0000.00716.77
8.0.250.0000.00816.90
8.0.240.0030.00616.86
8.0.230.0050.00316.79
8.0.220.0000.00616.85
8.0.210.0040.00416.74
8.0.200.0000.00716.85
8.0.190.0120.00016.93
8.0.180.0000.00716.83
8.0.170.0050.00316.83
8.0.160.0000.00716.69
8.0.150.0050.00316.76
8.0.140.0080.00016.71
8.0.130.0000.00613.22
8.0.120.0000.00716.82
8.0.110.0040.00416.86
8.0.100.0000.00716.66
8.0.90.0040.00416.89
8.0.80.0060.01016.88
8.0.70.0040.00416.85
8.0.60.0030.00516.85
8.0.50.0040.00416.75
8.0.30.0130.00516.80
8.0.20.0120.01617.40
8.0.10.0040.00416.84
8.0.00.0110.00616.75
7.4.330.0020.00215.55
7.4.320.0000.00716.37
7.4.300.0000.00616.39
7.4.290.0100.00016.50
7.4.280.0050.00316.39
7.4.270.0000.00816.44
7.4.260.0030.00316.49
7.4.250.0040.00416.43
7.4.240.0030.00516.43
7.4.230.0000.00716.57
7.4.220.0110.00616.57
7.4.210.0080.00616.60
7.4.200.0000.00716.26
7.4.160.0090.00716.46
7.4.150.0150.00317.40
7.4.140.0120.00917.86
7.4.130.0050.01416.38
7.4.120.0070.01216.37
7.3.330.0030.00313.20
7.3.320.0030.00313.20
7.3.310.0060.00316.28
7.3.300.0030.00316.05
7.3.290.0000.00716.18
7.3.280.0080.01116.16
7.3.270.0150.00917.40
7.3.260.0080.01016.19
7.3.250.0060.01216.13
7.3.240.0070.00916.27
7.1.70.0000.01116.97

preferences:
42.67 ms | 401 KiB | 5 Q