3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = " "; if ($string) { echo "string is true"; } if (trim($string)) { echo "trimmed string is true."; }

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.40.0110.00718.86
8.3.30.0140.00019.01
8.3.20.0040.00420.16
8.3.10.0050.00320.35
8.3.00.0030.00519.13
8.2.170.0090.01222.96
8.2.160.0100.00320.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0000.00922.11
8.2.100.0070.00420.58
8.2.90.0050.00319.23
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0030.00518.08
8.2.30.0030.00519.38
8.2.20.0000.00717.63
8.2.10.0050.00318.12
8.2.00.0000.00817.66
8.1.270.0040.00422.05
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.82
8.1.230.0030.00719.15
8.1.220.0070.00317.74
8.1.210.0060.00318.77
8.1.200.0090.00317.22
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0050.00318.46
8.1.160.0040.00422.08
8.1.150.0070.00018.86
8.1.140.0000.00717.33
8.1.130.0030.00317.88
8.1.120.0030.00317.34
8.1.110.0000.00717.29
8.1.100.0040.00417.30
8.1.90.0030.00417.37
8.1.80.0000.00817.31
8.1.70.0030.00317.26
8.1.60.0060.00317.49
8.1.50.0030.00617.45
8.1.40.0040.00417.42
8.1.30.0050.00317.48
8.1.20.0040.00417.46
8.1.10.0000.00717.48
8.1.00.0000.00817.33
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0040.00418.40
8.0.270.0070.00017.25
8.0.260.0030.00317.16
8.0.250.0000.00716.83
8.0.240.0040.00416.94
8.0.230.0000.00716.88
8.0.220.0030.00316.86
8.0.210.0070.00016.85
8.0.200.0030.00316.87
8.0.190.0000.00716.92
8.0.180.0000.00716.78
8.0.170.0080.00016.75
8.0.160.0070.00016.77
8.0.150.0040.00416.84
8.0.140.0000.00716.82
8.0.130.0050.00013.25
8.0.120.0000.00716.68
8.0.110.0030.00516.73
8.0.100.0070.00016.64
8.0.90.0000.00716.74
8.0.80.0060.01216.88
8.0.70.0040.00416.70
8.0.60.0040.00416.85
8.0.50.0040.00416.89
8.0.30.0160.01017.05
8.0.20.0150.00717.40
8.0.10.0000.00716.95
8.0.00.0090.00916.84
7.4.330.0000.00615.00
7.4.320.0060.00016.47
7.4.300.0000.00616.44
7.4.290.0000.00716.46
7.4.280.0000.00816.44
7.4.270.0030.00316.34
7.4.260.0030.00316.54
7.4.250.0050.00216.41
7.4.240.0060.00116.48
7.4.230.0070.00016.36
7.4.220.0070.01116.42
7.4.210.0090.00616.56
7.4.200.0080.00016.45
7.4.160.0090.00616.36
7.4.150.0060.01317.40
7.4.140.0120.00417.86
7.4.130.0080.01216.34
7.4.120.0150.00316.35
7.4.110.0070.01016.32
7.4.100.0030.01516.32
7.4.90.0080.01116.48
7.4.80.0140.00319.39
7.4.70.0160.00016.66
7.4.60.0090.00716.47
7.4.50.0040.00416.43
7.4.40.0090.00916.30
7.4.30.0090.00616.59
7.4.00.0060.00914.60
7.3.330.0060.00012.93
7.3.320.0030.00313.09
7.3.310.0070.00015.96
7.3.300.0000.00716.18
7.3.290.0100.01016.17
7.3.280.0090.00716.14
7.3.270.0100.00717.40
7.3.260.0100.01016.21
7.3.250.0140.00316.40
7.3.240.0040.01216.54
7.3.230.0090.00916.46
7.3.210.0070.01016.33
7.3.200.0030.01319.39
7.3.190.0110.01116.35
7.3.180.0140.00716.23
7.3.170.0130.00716.32
7.3.160.0070.01016.44
7.2.330.0080.01216.18
7.2.320.0090.00916.61
7.2.310.0140.00716.39
7.2.300.0170.00616.34
7.2.290.0130.00316.36
7.2.60.0040.00716.88
7.1.200.0100.00015.83
7.1.70.0040.00416.85
7.1.60.0000.01919.12
7.1.50.0130.01016.56
7.1.00.0100.07022.31
7.0.200.0100.00316.45
7.0.140.0100.06022.09
7.0.60.0100.08019.97
7.0.50.0070.04017.91
7.0.40.0030.06020.23
7.0.30.0500.07020.00
7.0.20.0270.05720.00
7.0.10.0070.08720.20
7.0.00.0170.07320.08
5.6.280.0070.07020.90
5.6.210.0030.07020.72
5.6.200.0030.04718.12
5.6.190.0070.04020.49
5.6.180.0200.04720.64
5.6.170.0230.05020.48
5.6.160.0070.05320.50
5.6.150.0030.06018.19
5.6.140.0070.05018.11
5.6.130.0030.08318.17
5.6.120.0070.05021.01
5.6.110.0300.06020.95
5.6.100.0100.04720.97
5.6.90.0130.08020.98
5.6.80.0070.06720.34
5.6.70.4570.04020.41
5.5.350.0330.05020.31
5.5.340.0070.04717.98
5.5.330.0170.07020.14
5.5.320.0100.07020.51
5.5.310.0300.07020.26
5.5.300.0070.03717.93
5.5.290.0100.07017.94
5.5.280.0070.06020.73
5.5.270.0030.04320.75
5.5.260.0000.09320.87
5.5.250.0170.07020.61
5.5.240.0300.03020.27
5.4.450.2330.04319.25
5.4.440.2400.04019.39
5.4.430.2330.04319.57
5.4.420.2330.03719.52
5.4.410.2700.04719.08
5.4.400.2230.04019.15
5.4.390.0070.04319.16
5.4.380.0070.07718.80
5.4.370.0830.03718.94
5.4.360.2370.03718.77
5.4.350.2430.03718.80
5.4.340.2530.04319.13
5.4.320.2100.04019.06
5.4.310.2370.04018.88
5.4.300.2400.03318.93
5.4.290.2700.04719.09
5.4.280.2330.04319.21
5.4.270.2270.03019.08
5.4.260.2230.03718.79
5.4.250.2370.03019.15
5.4.240.2400.03719.07
5.4.230.3000.03018.80
5.4.220.2470.04019.08
5.4.210.2200.03719.09
5.4.200.2430.03718.91
5.4.190.2800.04319.12
5.4.180.2430.03019.23
5.4.170.2830.04319.21
5.4.160.2670.03318.86
5.4.150.2770.04719.07
5.4.140.2770.04016.33
5.4.130.2200.03716.43
5.4.120.2300.04016.26
5.4.110.2430.03016.23
5.4.100.2670.04016.43
5.4.90.2400.03716.18
5.4.80.2570.03316.45
5.4.70.2630.03016.48
5.4.60.2830.04316.04
5.4.50.2400.03316.41
5.4.40.2330.03316.38
5.4.30.2570.04016.37
5.4.20.2370.03316.38
5.4.10.2630.03716.43
5.4.00.2330.04015.71
5.3.290.2370.04014.50
5.3.280.2600.04314.56
5.3.270.2800.03714.51
5.3.260.2600.04014.58
5.3.250.2730.03314.46
5.3.240.2670.03014.61
5.3.230.2370.03314.57
5.3.220.3000.04714.57
5.3.210.3070.03014.54
5.3.200.2630.04714.50
5.3.190.2600.04314.39
5.3.180.2400.03714.49
5.3.170.2370.03314.42
5.3.160.2570.04014.43
5.3.150.2600.03714.57
5.3.140.2600.04314.50
5.3.130.2470.03714.39
5.3.120.2600.04714.41
5.3.110.2600.03314.38
5.3.100.2570.04013.88
5.3.90.2630.03314.04
5.3.80.2630.03713.89
5.3.70.2270.03313.92
5.3.60.0070.03713.87
5.3.50.0130.05313.84
5.3.40.0030.07313.95
5.3.30.1900.04013.86
5.3.20.2800.04013.67
5.3.10.2330.03313.53
5.3.00.2570.04013.59
5.2.170.2300.03311.15
5.2.160.2130.03311.24
5.2.150.2300.03311.00
5.2.140.2100.02711.00
5.2.130.2230.02710.99
5.2.120.1970.03311.04
5.2.110.2100.02710.98
5.2.100.1970.03010.93
5.2.90.2000.02711.11
5.2.80.2330.03311.17
5.2.70.2300.02311.00
5.2.60.2230.03310.98
5.2.50.2170.02711.03
5.2.40.1600.03310.93
5.2.30.1770.03010.83
5.2.20.1800.03011.00
5.2.10.1630.02710.93
5.2.00.1900.03010.71
5.1.60.1630.02010.07
5.1.50.1700.0279.88
5.1.40.1730.0239.91
5.1.30.1800.02010.30
5.1.20.1670.02310.32
5.1.10.1800.0339.96
5.1.00.1530.03010.05
5.0.50.0730.0238.63
5.0.40.0730.0208.45
5.0.30.0970.0438.30
5.0.20.0970.0238.17
5.0.10.1030.0208.39
5.0.00.1000.0438.10
4.4.90.0800.0178.10
4.4.80.1030.0178.10
4.4.70.0970.0178.10
4.4.60.1200.0178.10
4.4.50.0970.0138.10
4.4.40.1100.0308.10
4.4.30.1100.0178.10
4.4.20.0670.0238.10
4.4.10.0030.0138.10
4.4.00.0030.0238.10
4.3.110.0030.0208.10
4.3.100.0000.0178.10
4.3.90.0030.0278.10
4.3.80.0030.0338.10
4.3.70.0030.0138.10
4.3.60.0000.0208.10
4.3.50.0000.0178.10
4.3.40.0000.0278.10
4.3.30.0000.0208.10
4.3.20.0500.0308.10
4.3.10.0530.0208.10
4.3.00.0430.0208.10

preferences:
48.9 ms | 400 KiB | 5 Q