3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { const pi = 3.14; } class CircleMath extends Math { public static function calculateArea($radio) { return parent::pi * pow($radio, 2); } } class Circle { private $radio = '0.0'; private $color = <<<EOT red EOT; public function __construct($radio, $color) { $this->radio = $radio; $this->color = $color; } public function calculateArea() { return CircleMath::calculateArea($this->radio); } public function get_radio() { return $this->radio; } public function get_color() { return $this->color; } } $className = 'Circle'; $circle = new $className(6, <<<'EOT' green EOT); echo sprintf('El área del circulo color %s y con radio de longitud %s es: %s', $circle->get_color(), $circle->get_radio(), $circle->calculateArea()); ?>

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.210.0060.04112.40
5.4.200.0120.04212.39
5.4.190.0100.04212.39
5.4.180.0120.04912.39
5.4.170.0160.06912.40
5.4.160.0120.04312.39
5.4.150.0150.05212.39
5.4.140.0120.04812.08
5.4.130.0140.04012.06
5.4.120.0120.04112.03
5.4.110.0120.03912.02
5.4.100.0120.04912.02
5.4.90.0120.04212.03
5.4.80.0130.03912.02
5.4.70.0090.04312.02
5.4.60.0150.04412.02
5.4.50.0140.04112.02
5.4.40.0100.04112.01
5.4.30.0120.04312.00
5.4.20.0120.04312.00
5.4.10.0120.06712.00
5.4.00.0090.04311.50
5.3.270.0140.04212.72
5.3.260.0140.04312.72
5.3.250.0140.07112.72
5.3.240.0150.04912.72
5.3.230.0120.04712.71
5.3.220.0110.04312.68
5.3.210.0160.04912.68
5.3.200.0100.04712.68
5.3.190.0130.04512.68
5.3.180.0200.05312.67
5.3.170.0130.05012.67
5.3.160.0100.04912.67
5.3.150.0120.04712.67
5.3.140.0100.04712.66
5.3.130.0140.06012.66
5.3.120.0130.04712.66
5.3.110.0130.04712.66
5.3.100.0130.04512.12
5.3.90.0150.04312.09
5.3.80.0110.04612.08
5.3.70.0140.04312.09
5.3.60.0190.06812.07
5.3.50.0120.04512.01
5.3.40.0140.04312.01
5.3.30.0140.04311.98
5.3.20.0100.04611.76
5.3.10.0110.04311.72
5.3.00.0140.04411.71

preferences:
141.16 ms | 1394 KiB | 7 Q