3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Abstract Surfer Class * * @package hangten */ abstract class Surfer { abstract protected function rideWave($amplitude); public function applyWax($waxType){ echo("Ahh, all waxed up with '".$waxType."'. Ready to go!"); } public function paddleOut(){ echo("Paddling...."); } public function screamShark(){ echo("SHARK!!"); } } /** * RookieSurfer Class * * This surfer is green and can barely surf. * @package hangten */ class RookieSurfer extends Surfer { protected function rideWave($amplitude = 1){ echo("Trying.. Trying.. to ride a ".$amplitude."ft. wave, whew!"); } } /** * ProSurfer Class * * This surfer is crazy skilled!! * @package hangten */ class ProSurfer extends Surfer { protected function rideWave($amplitude = 8){ echo("Riding a ".$amplitude."ft. wave backwards doing a backflip!"); } public function killSharkWithBoard(){ echo("totally just sliced that shark in two!! booya!"); } } $rookie = new RookieSurfer; $rookie->applyWax("Candle Wax") $rookie->paddleOut(); $rookie->rideWave(2); $rookie->screamShark(); $pro = new ProSurfer; $pro->applyWax("Sex Wax"); $pro->paddleOut(); $pro->rideWave(50); $pro->killSharkWithBoard();

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.100.0150.04112.02
5.4.90.0120.04412.02
5.4.80.0160.05012.02
5.4.70.0130.04312.01
5.4.60.0220.05612.01
5.4.50.0150.03912.01
5.4.40.0130.04012.00
5.4.30.0140.04212.00
5.4.20.0200.05311.99
5.4.10.0120.04112.00
5.4.00.0160.04811.49
5.3.200.0130.04512.68
5.3.190.0190.05812.68
5.3.180.0150.04012.67
5.3.170.0150.04412.67
5.3.160.0220.05512.67
5.3.150.0150.04412.67
5.3.140.0150.04212.66
5.3.130.0180.07012.66
5.3.120.0160.04612.66
5.3.110.0150.05112.66
5.3.100.0200.05912.12
5.3.90.0140.04612.10
5.3.80.0150.04212.08
5.3.70.0220.05712.08
5.3.60.0200.05612.07
5.3.50.0140.04112.02
5.3.40.0210.05412.02
5.3.30.0130.04111.98
5.3.20.0140.04011.77
5.3.10.0110.04111.73
5.3.00.0110.04211.71

preferences:
132.05 ms | 1394 KiB | 7 Q