3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stars($starNumber) { for( $x = 0; $x < 5; $x++ ) { if( floor($starNumber)-$x >= 1 ) { echo '<i class="fa fa-star"></i>'; } elseif( $starNumber-$x > 0 ) { echo '<i class="fa fa-star-half-o"></i>'; } else { echo '<i class="fa fa-star-o"></i>'; } } } $stars = array(2, 2.5, 4.5, 5); foreach($stars as $starNumber) { echo "{$starNumber} stars:\n"; stars($starNumber); echo "\n\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)
8.5.00.0100.01020.02
8.4.150.0020.00114.05
8.4.140.0100.01119.10
8.4.130.0130.00718.02
8.4.120.0110.00920.59
8.4.110.0100.00720.63
8.4.100.0060.00317.73
8.4.90.0120.00920.35
8.4.80.0100.01118.96
8.4.70.0120.00818.96
8.4.60.0050.00520.48
8.4.50.0140.00619.55
8.4.40.0140.00719.23
8.4.30.0160.00318.82
8.4.20.0030.01619.73
8.4.10.0040.00421.89
8.3.280.0130.00718.31
8.3.270.0120.00716.49
8.3.260.0120.00716.75
8.3.250.0130.00618.65
8.3.240.0130.00716.66
8.3.230.0040.00516.80
8.3.220.0090.01019.04
8.3.210.0050.00616.52
8.3.200.0020.00616.41
8.3.190.0090.00917.13
8.3.180.0160.00416.71
8.3.170.0090.00920.49
8.3.160.0140.00416.49
8.3.150.0140.00420.95
8.3.140.0120.00616.64
8.3.130.0030.01016.50
8.3.120.0050.00320.74
8.3.110.0040.00420.94
8.3.100.0080.00016.63
8.3.90.0080.00018.13
8.3.80.0080.00417.97
8.3.70.0160.00016.50
8.3.60.0110.00718.55
8.3.50.0140.00716.81
8.3.40.0130.00723.84
8.3.30.0140.00018.54
8.3.20.0020.00524.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0130.00716.23
8.2.280.0120.00818.14
8.2.270.0150.00316.41
8.2.260.0120.00620.31
8.2.250.0090.00016.48
8.2.240.0120.00318.71
8.2.230.0060.00322.58
8.2.220.0040.00424.06
8.2.210.0110.00726.77
8.2.200.0100.00018.38
8.2.190.0140.00316.58
8.2.180.0040.01216.37
8.2.170.0040.01218.91
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0070.00324.66
8.2.130.0090.00026.16
8.2.120.0040.00426.16
8.2.110.0070.00322.20
8.2.100.0000.01117.71
8.2.90.0040.00419.41
8.2.80.0040.00417.97
8.2.70.0090.00548.48
8.2.60.0080.00448.75
8.2.50.0050.00533.27
8.2.40.0090.00348.47
8.2.30.0130.00348.50
8.2.20.0060.00748.53
8.2.10.0150.00248.53
8.2.00.0080.00848.50
8.1.330.0120.00716.14
8.1.320.0120.00718.01
8.1.310.0070.00716.57
8.1.300.0120.00316.33
8.1.290.0090.00018.88
8.1.280.0150.00425.92
8.1.270.0070.00024.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.59
8.1.230.0120.00021.02
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0090.00548.34
8.1.190.0100.00848.23
8.1.180.0070.00748.71
8.1.170.0080.00449.29
8.1.160.0090.00548.33
8.1.150.0100.00648.34
8.1.140.0110.00148.39
8.1.130.0080.00748.34
8.1.120.0120.00448.37
8.1.110.0150.00148.36
8.1.100.0100.00648.38
8.1.90.0140.00348.36
8.1.80.0120.00548.38
8.1.70.0120.00548.42
8.1.60.0160.00248.42
8.1.50.0140.00348.50
8.1.40.0160.00248.44
8.1.30.0180.00448.52
8.1.20.0110.00748.46
8.1.10.0150.00448.45
8.1.00.0140.00548.42
8.0.300.0040.00419.99
8.0.290.0090.00348.04
8.0.280.0100.00648.07
8.0.270.0100.00648.08
8.0.260.0130.00448.03
8.0.250.0080.00948.08
8.0.240.0060.00748.06
8.0.230.0080.00748.12
8.0.220.0140.00248.03
8.0.210.0110.00448.07
8.0.200.0120.00448.12
8.0.190.0100.00548.06
8.0.180.0090.00748.13
8.0.170.0090.00548.12
8.0.160.0110.00348.10
8.0.150.0080.00548.04
8.0.140.0080.00548.09
8.0.130.0110.00248.06
8.0.120.0090.00548.03
8.0.110.0120.00248.11
8.0.100.0130.00348.03
8.0.90.0140.00148.03
8.0.80.0160.00048.04
8.0.70.0100.00548.07
8.0.60.0120.00248.07
8.0.50.0110.00448.07
8.0.30.0110.00548.03
8.0.20.0140.00348.03
8.0.10.0140.00148.07
7.4.330.0200.00925.92

preferences:
113.01 ms | 403 KiB | 5 Q