3v4l.org

run code in 300+ PHP versions simultaneously
<?php class UserData{ public $user; public $userid; public function __construct($username, $userid){ $this->user = $username; $this->userid = $userid; } public function display(){ echo "Username is {$this->user} and user id is{$this->userid}"; } class Admin extends UserData{ } } $user = "mamun"; $id = "25"; $ur = new UserData($user, $id); echo "<br/>"; $ur->display(); echo "<br/>"; $ad = new Admin($user,$id); $ad->display(); ?>

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.1.70.1730.01314.91
7.1.60.2230.01333.17
7.1.50.2570.01332.90
7.1.40.1900.01732.41
7.1.30.2770.02032.48
7.1.20.1530.02032.39
7.1.10.1570.01014.41
7.1.00.1470.01314.62
7.0.200.2070.01314.71
7.0.190.2930.01314.52
7.0.180.1700.02014.29
7.0.170.2930.00714.09
7.0.160.2170.01714.43
7.0.150.1500.01714.26
7.0.140.1270.02014.07
7.0.130.1370.01314.43
7.0.120.1370.02314.43
7.0.110.1500.00714.51
7.0.100.1470.01014.18
7.0.90.1130.01714.29
7.0.80.1370.00714.22
7.0.70.1500.00314.22
7.0.60.1270.01314.22
7.0.50.1470.01314.29
7.0.40.1370.01014.54
7.0.30.1330.01014.62
7.0.20.1530.01314.39
7.0.10.1500.00714.50
7.0.00.1470.01014.36

preferences:
135.74 ms | 1398 KiB | 7 Q