3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shortstring='hello'; $longstring='long'; for($run=0;$run<1000;$run++) $longstring.='dsfsda'.rand(1000,2000); $time=microtime(true); for($run=0;$run<1000;$run++) $temp=strlen($shortstring); $time=microtime(true)-$time; echo "strlen on short string took $time seconds\n"; $time=microtime(true); for($run=0;$run<1000;$run++) $temp2=strlen($longstring); $time=microtime(true)-$time; echo "strlen on long string took $time seconds\n";

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)
7.2.00.0100.00619.06
7.1.70.0080.01017.08
7.1.60.0130.00417.11
7.1.50.0300.00716.86
7.1.40.0110.01116.70
7.1.30.0080.01216.72
7.1.20.0080.01916.59
7.1.10.0110.00516.59
7.1.00.0050.01116.71
7.0.200.0080.00816.87
7.0.190.0110.00716.56
7.0.180.0080.01216.19
7.0.170.0040.01116.21
7.0.160.0150.00416.26
7.0.150.0160.00616.27
7.0.140.0160.00516.41
7.0.130.0130.00416.39
7.0.120.0100.00616.72
7.0.110.0080.00816.45
7.0.100.0120.00316.31
7.0.90.0120.00516.34
7.0.80.0130.01016.52
7.0.70.0120.00816.46
7.0.60.0080.00816.21
7.0.50.0170.00616.34
7.0.40.0110.00415.16
7.0.30.0030.01015.16
7.0.20.0070.01115.16
7.0.10.0080.00815.16
7.0.00.0060.01115.16
5.6.300.0150.03320.67
5.6.290.0120.03620.92
5.6.280.0090.04121.00
5.6.270.0140.04120.99
5.6.260.0000.04820.87
5.6.250.0040.04820.80
5.6.240.0060.04420.96
5.6.230.0000.04920.85
5.6.220.0100.05120.93
5.6.210.0070.05020.61
5.6.200.0070.05320.86
5.6.190.0070.05621.02
5.6.180.0140.03820.98
5.6.170.0040.07120.98
5.6.160.0140.03821.02
5.6.150.0070.04620.94
5.6.140.0130.05221.04
5.6.130.0110.03520.92
5.6.120.0100.04621.04
5.6.110.0030.05020.82
5.6.100.0070.04420.96
5.6.90.0110.04120.94
5.6.80.0070.06520.24
5.6.70.0090.04920.11
5.6.60.0110.06120.30
5.6.50.0040.04520.31
5.6.40.0250.03420.09
5.6.30.0030.08420.34
5.6.20.0090.04420.17
5.6.10.0090.04220.09
5.6.00.0100.04220.29
5.5.380.0190.04317.46
5.5.370.0090.04117.61
5.5.360.0030.08117.55
5.5.350.0000.04417.45
5.5.340.0070.04017.75
5.5.330.0000.04417.87
5.5.320.0030.03917.75
5.5.310.0030.04418.03
5.5.300.0030.04118.02
5.5.290.0070.04918.07
5.5.280.0030.06817.99
5.5.270.0070.06617.94
5.5.260.0160.03918.01
5.5.250.0030.05317.65
5.5.240.0040.04917.22
5.5.230.0060.03717.32
5.5.220.0070.05717.36
5.5.210.0030.05117.21
5.5.200.0040.03917.05
5.5.190.0040.04217.35
5.5.180.0090.03617.48
5.5.160.0030.03817.19
5.5.150.0030.07017.28
5.5.140.0000.04517.41
5.5.130.0030.07017.28
5.5.120.0140.03717.05
5.5.110.0170.03117.41
5.5.100.0060.03917.20
5.5.90.0060.04417.37
5.5.80.0030.03817.19
5.5.70.0100.04017.19
5.5.60.0070.04116.98
5.5.50.0190.03516.94
5.5.40.0060.03517.23
5.5.30.0120.03417.27
5.5.20.0120.03717.09
5.5.10.0100.03517.20
5.5.00.0130.04716.93
5.4.450.0070.05319.47
5.4.440.0070.06319.43
5.4.430.0030.04619.49
5.4.420.0040.04319.41
5.4.410.0070.03519.26
5.4.400.0070.03419.15
5.4.390.0000.04419.07
5.4.380.0030.05319.02
5.4.370.0090.03719.16
5.4.360.0040.05718.98
5.4.350.0000.04319.06
5.4.340.0100.04518.98
5.4.320.0000.05218.91
5.4.310.0070.06418.98
5.4.300.0060.03719.16
5.4.290.0040.04018.88
5.4.280.0000.05018.84
5.4.270.0100.05018.88
5.4.260.0030.04519.00
5.4.250.0060.04419.00
5.4.240.0100.04019.04
5.4.230.0100.03619.13
5.4.220.0100.08019.06
5.4.210.0070.03919.05
5.4.200.0030.04518.97
5.4.190.0100.05218.84
5.4.180.0030.04318.90
5.4.170.0060.04018.98
5.4.160.0100.03618.80
5.4.150.0070.04319.04
5.4.140.0030.04516.57
5.4.130.0100.03516.38
5.4.120.0060.04016.43
5.4.110.0060.03516.36
5.4.100.0060.03716.50
5.4.90.0070.05016.57
5.4.80.0160.03316.55
5.4.70.0070.03316.40
5.4.60.0030.04116.60
5.4.50.0030.03916.32
5.4.40.0070.03716.45
5.4.30.0070.03516.63
5.4.20.0100.03116.47
5.4.10.0070.03416.55
5.4.00.0130.03815.96
5.3.290.0060.04015.16
5.3.280.0100.04115.16
5.3.270.0030.05215.16
5.3.260.0060.04515.16
5.3.250.0070.03815.16
5.3.240.0060.04715.16
5.3.230.0120.03715.16
5.3.220.0130.03815.16
5.3.210.0070.04015.16
5.3.200.0130.03215.16
5.3.190.0060.03715.16
5.3.180.0150.02815.16
5.3.170.0000.04915.16
5.3.160.0060.04515.16
5.3.150.0000.04115.16
5.3.140.0040.04715.16
5.3.130.0030.05515.16
5.3.120.0030.04815.16
5.3.110.0100.07315.16
5.3.100.0060.03715.16
5.3.90.0130.04515.16
5.3.80.0000.04515.16
5.3.70.0090.03715.16
5.3.60.0120.03115.16
5.3.50.0100.06615.16
5.3.40.0070.03715.16
5.3.30.0070.05615.16
5.3.20.0030.03815.16
5.3.10.0030.04115.16
5.3.00.0070.04515.16
5.2.170.0070.04315.16
5.2.160.0030.03115.16
5.2.150.0000.03715.16
5.2.140.0030.04015.16
5.2.130.0040.03215.16
5.2.120.0000.04015.16
5.2.110.0070.03415.16
5.2.100.0030.04115.16
5.2.90.0000.04015.16
5.2.80.0030.03015.16
5.2.70.0100.05815.16
5.2.60.0060.03015.16
5.2.50.0100.03515.16
5.2.40.0040.03515.16
5.2.30.0070.03315.16
5.2.20.0040.02915.16
5.2.10.0030.03215.16
5.2.00.0030.03315.16
5.1.60.0030.02715.16
5.1.50.0000.03515.16
5.1.40.0030.04615.16
5.1.30.0030.02615.16
5.1.20.0060.02515.16
5.1.10.0090.01915.16
5.1.00.0130.03815.16
5.0.50.0000.02915.16
5.0.40.0000.02415.16
5.0.30.0000.03715.16
5.0.20.0140.01415.16
5.0.10.0000.02415.16
5.0.00.0070.03015.16
4.4.90.0040.01815.16
4.4.80.0030.01715.16
4.4.70.0030.01715.16
4.4.60.0000.02015.16
4.4.50.0030.01715.16
4.4.40.0000.02615.16
4.4.30.0090.01415.16
4.4.20.0000.01815.16
4.4.10.0090.00915.16
4.4.00.0000.02815.16
4.3.110.0000.02515.16
4.3.100.0040.01815.16
4.3.90.0060.01315.16
4.3.80.0030.03015.16
4.3.70.0000.01915.16
4.3.60.0030.01415.16
4.3.50.0060.01215.16
4.3.40.0000.02815.16
4.3.30.0000.02715.16
4.3.20.0000.02315.16
4.3.10.0030.01715.16
4.3.00.0030.01615.16

preferences:
34.45 ms | 400 KiB | 5 Q