3v4l.org

run code in 300+ PHP versions simultaneously
<?php $officials = [' off1' , 'off2' , '' , 'off3 ' , null]; // space ^ empty string^ space^ ^null $result = []; array_walk( $officials, function($v) use (&$result) { $v = trim((string) $v); if (strlen($v)) { $result[] = $v; } } ); var_export($result);

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.130.0130.00717.66
8.4.120.0110.00920.50
8.4.110.0030.00622.70
8.4.100.0100.01017.79
8.4.90.0120.00722.45
8.4.80.0070.00319.59
8.4.70.0160.00617.87
8.4.60.0130.00918.77
8.4.50.0140.00620.43
8.4.40.0130.00717.60
8.4.30.0100.00020.35
8.4.20.0100.01019.74
8.4.10.0070.01019.27
8.3.260.0100.00916.64
8.3.250.0130.00618.78
8.3.240.0120.00616.66
8.3.230.0130.00616.44
8.3.220.0050.00218.90
8.3.210.0090.01016.54
8.3.200.0050.00416.68
8.3.190.0120.00617.22
8.3.180.0050.00316.35
8.3.170.0040.00417.20
8.3.160.0140.00418.39
8.3.150.0110.00720.53
8.3.140.0000.00716.59
8.3.130.0000.00818.60
8.3.120.0000.00818.95
8.3.110.0030.00616.62
8.3.100.0080.00016.79
8.3.90.0040.00426.77
8.3.80.0070.00318.55
8.3.70.0100.00716.63
8.3.60.0040.01118.43
8.3.50.0070.00718.40
8.3.40.0110.00323.84
8.3.30.0000.01419.09
8.3.20.0050.00324.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.290.0100.00920.48
8.2.280.0090.00918.20
8.2.270.0120.00617.18
8.2.260.0040.00819.02
8.2.250.0050.00318.20
8.2.240.0030.01718.96
8.2.230.0050.00320.94
8.2.220.0000.00837.54
8.2.210.0000.00826.77
8.2.200.0070.00316.24
8.2.190.0120.00616.88
8.2.180.0080.01225.92
8.2.170.0060.01218.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.85
8.2.110.0090.00019.33
8.2.100.0210.00218.90
8.2.90.0190.00218.90
8.2.80.0160.00518.90
8.2.70.0180.00318.96
8.2.60.0180.00218.88
8.2.50.0180.00218.89
8.2.40.0190.00018.90
8.2.30.0160.00318.87
8.2.20.0120.00718.90
8.2.10.0110.00918.89
8.2.00.0130.00718.89
8.1.330.0100.00923.77
8.1.320.0110.00816.07
8.1.310.0150.00616.79
8.1.300.0060.00316.01
8.1.290.0070.00430.84
8.1.280.0070.00725.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00719.13
8.1.230.0150.00418.85
8.1.220.0190.00618.79
8.1.210.0180.00218.79
8.1.200.0210.00318.79
8.1.190.0170.00518.79
8.1.180.0130.00618.72
8.1.170.0110.00818.79
8.1.160.0150.00618.85
8.1.150.0110.00918.79
8.1.140.0150.00418.79
8.1.130.0150.00518.72
8.1.120.0150.00518.79
8.1.110.0160.00318.85
8.1.100.0180.00118.85
8.1.90.0190.00018.79
8.1.80.0110.00918.79
8.1.70.0130.00518.79
8.1.60.0130.00718.79
8.1.50.0170.00118.79
8.1.40.0150.00318.83
8.1.30.0130.00518.85
8.1.20.0110.00818.91
8.1.10.0140.00718.79
8.1.00.0180.00018.79
8.0.300.0120.00518.47
8.0.290.0130.00618.53
8.0.280.0150.00518.46
8.0.270.0130.00718.46
8.0.260.0170.00418.46
8.0.250.0140.00418.47
8.0.240.0080.01018.53
8.0.230.0160.00318.53
8.0.220.0140.00618.46
8.0.210.0160.00418.37
8.0.200.0190.00518.47
8.0.190.0180.00118.53
8.0.180.0150.00618.53
8.0.170.0230.00218.53
8.0.160.0160.00618.53
8.0.150.0120.00518.52
8.0.140.0120.00618.46
8.0.130.0100.00718.43
8.0.120.0180.00218.53
8.0.110.0150.00318.53
8.0.100.0160.00418.46
8.0.90.0150.00418.45
8.0.80.0100.00818.53
8.0.70.0170.00318.36
8.0.60.0140.00618.40
8.0.50.0100.00918.47
8.0.30.0150.00418.46
8.0.20.0110.00818.53
8.0.10.0110.00718.47

preferences:
28.23 ms | 403 KiB | 5 Q