3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bidlogic { public function getHighestBid() { return 5; } public function submitBid($bid) { if( ($this->getHighestBid() < 50 && $this->getHighestBid() >= 0 && $bid > $this->getHighestBid()+0.50) | | ($this->getHighestBid() < 500 && $this->getHighestBid() >= 50 && $bid > $this->getHighestBid()+1) || ($this->getHighestBid() < 1000 && $this->getHighestBid() >= 500 && $bid > $this->getHighestBid()+5) || ($this->getHighestBid() < 5000 && $this->getHighestBid() >= 1000 && $bid > $this->getHighestBid()+10 ) || ($this->getHighestBid() >= 5000 && $bid > $this->getHighestBid()+50) ){ echo "Pass"; } } } $a = new bidlogic(); $a->submitBid(100);

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)
5.4.280.0140.05512.38
5.4.270.0200.05012.38
5.4.260.0130.05612.38
5.4.250.0130.05112.38
5.4.240.0090.05612.38
5.4.230.0140.05012.38
5.4.220.0140.05012.38
5.4.210.0150.07212.37
5.4.200.0180.04312.37
5.4.190.0110.05612.37
5.4.180.0160.05212.37
5.4.170.0140.05612.38
5.4.160.0150.05512.37
5.4.150.0160.05312.37
5.4.140.0190.08312.06
5.4.130.0190.05012.04
5.4.120.0140.05512.00
5.4.110.0100.06112.00
5.4.100.0120.07012.00
5.4.90.0160.06612.01
5.4.80.0140.05912.00
5.4.70.0130.05612.00
5.4.60.0090.05712.00
5.4.50.0150.06912.00
5.4.40.0140.06111.98
5.4.30.0120.05811.98
5.4.20.0140.05711.98
5.4.10.0110.06711.98
5.4.00.0140.06111.47
5.3.280.0130.05512.71
5.3.270.0130.06312.72
5.3.260.0120.06012.72
5.3.250.0100.05412.72
5.3.240.0130.04912.72
5.3.230.0130.05112.71
5.3.220.0120.06612.68
5.3.210.0160.06212.68
5.3.200.0110.05612.68
5.3.190.0120.05612.68
5.3.180.0110.05312.67
5.3.170.0110.05912.67
5.3.160.0120.05512.68
5.3.150.0100.05312.68
5.3.140.0090.05212.66
5.3.130.0120.05412.66
5.3.120.0110.06112.66
5.3.110.0090.06012.66
5.3.100.0160.04912.12
5.3.90.0180.05012.08
5.3.80.0140.05112.08
5.3.70.0140.04712.07
5.3.60.0110.04912.06
5.3.50.0090.05212.00
5.3.40.0100.05112.00
5.3.30.0070.05411.96
5.3.20.0140.04811.74
5.3.10.0070.05611.71
5.3.00.0100.04711.70

preferences:
147.96 ms | 1394 KiB | 7 Q