3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shortstring='hello'; $longstring='long'; for($run=0;$run<10000;$run++) $longstring.='dsfsda'.rand(1000,2000); $time=microtime(true); for($run=0;$run<100000;$run++) $temp=strlen($shortstring); $time=microtime(true)-$time; echo "strlen on short string took $time seconds\n"; $time=microtime(true); for($run=0;$run<100000;$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.4.10.0100.01614.93
7.4.00.0030.02115.13
7.3.130.0090.01614.80
7.3.120.0040.02215.11
7.3.110.0140.01014.84
7.3.100.0110.01114.89
7.3.90.0060.01314.66
7.3.80.0090.01214.92
7.3.70.0070.01115.04
7.3.60.0030.01615.07
7.3.50.0040.01114.75
7.3.40.0110.00714.83
7.3.30.0000.01715.03
7.3.20.0100.01016.80
7.3.10.0110.01116.50
7.3.00.0060.01616.69
7.2.260.0100.01415.35
7.2.250.0090.00915.35
7.2.240.0060.00815.42
7.2.230.0080.01115.39
7.2.220.0030.02215.43
7.2.210.0070.01315.12
7.2.200.0040.00915.10
7.2.190.0040.01515.32
7.2.180.0070.00715.15
7.2.170.0120.00914.93
7.2.160.0100.01015.23
7.2.150.0130.00716.54
7.2.140.0060.01216.89
7.2.130.0060.01616.79
7.2.120.0090.00916.70
7.2.110.0070.01416.95
7.2.100.0060.01516.98
7.2.90.0060.00916.77
7.2.80.0070.01317.02
7.2.70.0100.01316.92
7.2.60.0070.01117.01
7.2.50.0040.01416.91
7.2.40.0040.01516.95
7.2.30.0040.01417.03
7.2.20.0000.02216.80
7.2.10.0100.01316.98
7.2.00.0020.01818.13
7.1.330.0060.02215.71
7.1.320.0140.01715.66
7.1.310.0000.02415.70
7.1.300.0060.02115.51
7.1.290.0070.02015.61
7.1.280.0040.02515.59
7.1.270.0070.02015.76
7.1.260.0130.01615.69
7.1.250.0000.03715.84
7.1.240.0030.02215.87
7.1.230.0060.02215.79
7.1.220.0000.02915.93
7.1.210.0090.01515.63
7.1.200.0030.02315.71
7.1.190.0110.01815.70
7.1.180.0070.02015.76
7.1.170.0000.02615.82
7.1.160.0030.02015.74
7.1.150.0070.01715.52
7.1.140.0000.02615.82
7.1.130.0040.02515.87
7.1.120.0070.02015.71
7.1.110.0100.01915.88
7.1.100.0070.02015.89
7.1.90.0090.01515.85
7.1.80.0100.01015.89
7.1.70.0030.01916.32
7.1.60.0050.02417.69
7.1.50.0070.02216.39
7.1.40.0060.01515.65
7.1.30.0030.02315.68
7.1.20.0070.02015.69
7.1.10.0100.01915.69
7.1.00.0050.05019.03
7.0.330.0100.02715.23
7.0.320.0070.02015.49
7.0.310.0000.02115.36
7.0.300.0030.02615.40
7.0.290.0100.01315.39
7.0.280.0070.01715.45
7.0.270.0030.02015.27
7.0.260.0030.02315.41
7.0.250.0000.02815.15
7.0.240.0070.02415.05
7.0.230.0030.02715.36
7.0.220.0100.01615.09
7.0.210.0100.01615.43
7.0.200.0020.01616.05
7.0.190.0100.01915.34
7.0.180.0090.01515.41
7.0.170.0030.01615.44
7.0.160.0000.03015.29
7.0.150.0000.02615.36
7.0.140.0050.05018.72
7.0.130.0070.01915.52
7.0.120.0130.01315.42
7.0.110.0000.02315.53
7.0.100.0060.02215.54
7.0.90.0120.03517.89
7.0.80.0120.03317.70
7.0.70.0120.03617.62
7.0.60.0050.03117.78
7.0.50.0080.02917.90
7.0.40.0030.03516.82
7.0.30.0050.03416.83
7.0.20.0070.04716.60
7.0.10.0120.03016.70
7.0.00.0100.04616.71
5.6.400.0030.05614.52
5.6.390.0030.05014.18
5.6.380.0000.05514.43
5.6.370.0100.05014.57
5.6.360.0130.04314.64
5.6.350.0030.05114.20
5.6.340.0060.04514.67
5.6.330.0070.04614.22
5.6.320.0100.04714.40
5.6.310.0100.04614.45
5.6.300.0070.05514.27
5.6.290.0030.05014.27
5.6.280.0130.07017.72
5.6.270.0030.07714.21
5.6.260.0030.06914.23
5.6.250.0070.04614.36
5.6.240.0000.06014.18
5.6.230.0120.06317.53
5.6.220.0080.05317.62
5.6.210.0070.05117.43
5.6.200.0070.07317.63
5.6.190.0080.05617.70
5.6.180.0070.07417.60
5.6.170.0120.07417.84
5.6.160.0080.08017.62
5.6.150.0070.08017.76
5.6.140.0030.07717.71
5.6.130.0050.08217.53
5.6.120.0050.07917.63
5.6.110.0080.07517.84
5.6.100.0070.07617.69
5.6.90.0030.07917.81
5.6.80.0020.08017.38
5.6.70.0070.06917.57
5.6.60.0120.08017.49
5.6.50.0070.06117.36
5.6.40.0070.07017.48
5.6.30.0100.07317.37
5.6.20.0080.08117.37
5.6.10.0120.07417.43
5.6.00.0050.07217.30
5.5.380.0030.05314.39
5.5.370.0030.05617.39
5.5.360.0100.04917.29
5.5.350.0080.05417.28
5.5.340.0070.05317.52
5.5.330.0030.05617.58
5.5.320.0030.06417.63
5.5.310.0050.08317.59
5.5.300.0050.07817.43
5.5.290.0120.07817.36
5.5.280.0080.07117.46
5.5.270.0080.07617.63
5.5.260.0020.08217.35
5.5.250.0130.07417.48
5.5.240.0050.07917.07
5.5.230.0050.08117.19
5.5.220.0070.07817.25
5.5.210.0070.07717.25
5.5.200.0050.06317.19
5.5.190.0100.06917.16
5.5.180.0100.06717.17
5.5.170.0070.05614.13
5.5.160.0070.07517.21
5.5.150.0050.08617.17
5.5.140.0030.07317.37
5.5.130.0100.07217.16
5.5.120.0080.05517.22
5.5.110.0070.06117.26
5.5.100.0050.07416.98
5.5.90.0050.07617.20
5.5.80.0130.06917.18
5.5.70.0080.06817.22
5.5.60.0100.06817.17
5.5.50.0050.08717.28
5.5.40.0070.05517.24
5.5.30.0050.08817.06
5.5.20.0020.07717.17
5.5.10.0030.08217.21
5.5.00.0030.07916.95
5.4.450.0070.06815.11
5.4.440.0170.06515.08
5.4.430.0080.07015.22
5.4.420.0140.06415.17
5.4.410.0050.07715.16
5.4.400.0070.07414.97
5.4.390.0080.07115.00
5.4.380.0030.06115.07
5.4.370.0070.05714.96
5.4.360.0130.04815.02
5.4.350.0100.07214.82
5.4.340.0080.06915.07
5.4.330.0070.04810.99
5.4.320.0050.06215.16
5.4.310.0050.08215.04
5.4.300.0100.07714.96
5.4.290.0070.06214.91
5.4.280.0080.05314.97
5.4.270.0020.06715.04
5.4.260.0030.07915.14
5.4.250.0050.07815.13
5.4.240.0020.06514.98
5.4.230.0030.08115.16
5.4.220.0030.05915.00
5.4.210.0080.07914.87
5.4.200.0070.07215.15
5.4.190.0080.07915.06
5.4.180.0050.07314.98
5.4.170.0100.05614.89
5.4.160.0050.07714.92
5.4.150.0080.07815.00
5.4.140.0050.07813.60
5.4.130.0130.06813.66
5.4.120.0080.07113.74
5.4.110.0050.05913.60
5.4.100.0080.05813.50
5.4.90.0020.07313.72
5.4.80.0080.07013.74
5.4.70.0050.07913.55
5.4.60.0080.07413.69
5.4.50.0050.06713.82
5.4.40.0050.05813.77
5.4.30.0030.08213.46
5.4.20.0050.07313.78
5.4.10.0080.05313.71
5.4.00.0070.07313.35
5.3.290.0070.09012.69
5.3.280.0050.08312.67
5.3.270.0030.07612.66
5.3.260.0050.08212.62
5.3.250.0050.08012.67
5.3.240.0000.06212.52
5.3.230.0020.07512.54
5.3.220.0080.06212.51
5.3.210.0080.07212.52
5.3.200.0030.08112.49
5.3.190.0050.06612.58
5.3.180.0070.07112.54
5.3.170.0050.08412.55
5.3.160.0030.08412.56
5.3.150.0070.08012.53
5.3.140.0030.08812.51
5.3.130.0130.07512.52
5.3.120.0050.07812.63
5.3.110.0050.07312.58
5.3.100.0030.08312.31
5.3.90.0030.06712.24
5.3.80.0200.07812.20
5.3.70.0050.08212.20
5.3.60.0050.07312.22
5.3.50.0030.06312.21
5.3.40.0050.07412.32
5.3.30.0070.08412.31
5.3.20.0030.06712.11
5.3.10.0080.08211.89
5.3.00.0080.07711.96
5.2.170.0000.10713.55
5.2.160.0000.09713.55
5.2.150.0000.07013.55
5.2.140.0030.06313.55
5.2.130.0000.06713.55
5.2.120.0000.06313.55
5.2.110.0070.10013.55
5.2.100.0100.08313.55
5.2.90.0000.06013.55
5.2.80.0030.09013.55
5.2.70.0070.05713.55
5.2.60.0070.09013.55
5.2.50.0030.05713.55
5.2.40.0030.07313.55
5.2.30.0070.09313.55
5.2.20.0130.08313.55
5.2.10.0000.10013.55
5.2.00.0070.06013.55
5.1.60.0000.07013.55
5.1.50.0030.05013.55
5.1.40.0000.07713.55
5.1.30.0070.08013.55
5.1.20.0000.09313.55
5.1.10.0100.08313.55
5.1.00.0070.09013.55
5.0.50.0070.11713.55
5.0.40.0000.13013.55
5.0.30.0000.13313.55
5.0.20.0030.10713.55
5.0.10.0030.10713.55
5.0.00.0030.13313.55
4.4.90.0070.08013.55
4.4.80.0070.08013.55
4.4.70.0070.10313.55
4.4.60.0070.06013.55
4.4.50.0130.09013.55
4.4.40.0030.07013.55
4.4.30.0000.07313.55
4.4.20.0000.12013.55
4.4.10.0100.10013.55
4.4.00.0070.06713.55
4.3.110.0030.11013.55
4.3.100.0000.11313.55
4.3.90.0030.09313.55
4.3.80.0030.11313.55
4.3.70.0030.09713.55
4.3.60.0030.08313.55
4.3.50.0070.08013.55
4.3.40.0030.11713.55
4.3.30.0030.12013.55
4.3.20.0000.12313.55
4.3.10.0030.08313.55
4.3.00.0000.09013.55

preferences:
45.88 ms | 401 KiB | 5 Q