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{ public $level; public function display(){ echo "Username is {$this->user} and user id is{$this->userid} and user level is ($this->level)"; } } $user = "mamun"; $id = "25"; $ur = new UserData($user, $id); echo "<br/>"; $ur->display(); echo "<br/>"; $ad = new Admin($user,$id); $ad->level ="Administrator"; $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)
8.3.60.0110.01116.73
8.3.50.0120.00316.67
8.3.40.0090.00618.84
8.3.30.0070.00718.85
8.3.20.0040.00420.36
8.3.10.0050.00321.85
8.3.00.0030.00617.72
8.2.180.0070.01416.75
8.2.170.0140.00422.96
8.2.160.0040.01120.52
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0080.00020.38
8.2.120.0060.00326.35
8.2.110.0030.00720.98
8.2.100.0080.00418.03
8.2.90.0000.00819.23
8.2.80.0050.00317.97
8.2.70.0080.00417.63
8.2.60.0030.00617.91
8.2.50.0050.00518.10
8.2.40.0000.00822.31
8.2.30.0040.00421.10
8.2.20.0000.00718.12
8.2.10.0070.00018.21
8.2.00.0000.00718.02
8.1.280.0060.00925.92
8.1.270.0050.00324.00
8.1.260.0070.00026.35
8.1.250.0090.00628.09
8.1.240.0090.00022.14
8.1.230.0030.01219.09
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0100.00017.38
8.1.190.0050.00317.23
8.1.180.0000.00718.10
8.1.170.0040.00418.57
8.1.160.0040.00419.00
8.1.150.0040.00420.52
8.1.140.0000.00817.41
8.1.130.0000.00718.85
8.1.120.0070.00017.33
8.1.110.0040.00417.30
8.1.100.0000.00817.47
8.1.90.0080.00017.47
8.1.80.0040.00417.34
8.1.70.0070.00017.46
8.1.60.0000.00917.49
8.1.50.0050.00317.42
8.1.40.0040.00417.58
8.1.30.0000.00717.65
8.1.20.0060.00317.66
8.1.10.0040.00417.49
8.1.00.0050.00217.55
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0080.00018.47
8.0.270.0000.00817.24
8.0.260.0040.00416.80
8.0.250.0040.00416.98
8.0.240.0080.00017.02
8.0.230.0000.01016.89
8.0.220.0050.00316.91
8.0.210.0000.00716.84
8.0.200.0030.00317.02
8.0.190.0060.00316.98
8.0.180.0040.00416.89
8.0.170.0000.00816.83
8.0.160.0070.00016.89
8.0.150.0070.00016.85
8.0.140.0040.00416.92
8.0.130.0000.00613.41
8.0.120.0000.00716.84
8.0.110.0070.00016.87
8.0.100.0030.00316.86
8.0.90.0040.00416.83
8.0.80.0060.00916.87
8.0.70.0040.00416.74
8.0.60.0000.00816.83
8.0.50.0020.00516.77
8.0.30.0070.01117.02
8.0.20.0110.00817.40
8.0.10.0000.00816.93
8.0.00.0110.01117.00
7.4.330.0020.00215.55
7.4.320.0060.00316.37
7.4.300.0030.00316.63
7.4.290.0100.00016.48
7.4.280.0080.00016.44
7.4.270.0050.00316.51
7.4.260.0000.00513.28
7.4.250.0050.00216.43
7.4.240.0040.00416.44
7.4.230.0030.00316.43
7.4.220.0110.00716.55
7.4.210.0060.01216.49
7.4.200.0040.00416.56
7.4.160.0110.00616.48
7.4.150.0100.00717.40
7.4.140.0140.00617.86
7.4.130.0130.00616.41
7.4.120.0100.01016.46
7.4.110.0130.00316.30
7.4.100.0060.01316.30
7.4.90.0070.01016.59
7.4.80.0110.00619.39
7.4.70.0170.00016.61
7.4.60.0100.00716.48
7.4.50.0090.00616.41
7.4.40.0100.00716.60
7.4.30.0100.00716.45
7.4.00.0030.01414.87
7.3.330.0000.00513.25
7.3.320.0050.00013.37
7.3.310.0040.00416.31
7.3.300.0030.00316.17
7.3.290.0090.00916.34
7.3.280.0090.00716.33
7.3.270.0190.00017.40
7.3.260.0090.01116.30
7.3.250.0100.00916.37
7.3.240.0110.00616.31
7.3.230.0200.00316.34
7.3.210.0150.00416.63
7.3.200.0080.00816.35
7.3.190.0040.01216.32
7.3.180.0060.00916.43
7.3.170.0070.01016.53
7.3.160.0100.00616.61
7.2.330.0060.01216.69
7.2.320.0090.00916.34
7.2.310.0040.01316.78
7.2.300.0090.01316.83
7.2.290.0090.00716.80
7.2.60.0040.01216.75
7.2.00.0030.00919.40
7.1.200.0000.01315.88
7.1.100.0100.00317.80
7.1.70.2600.00715.35
7.1.60.0370.01032.89
7.1.50.2770.01732.63
7.1.40.2370.02032.66
7.1.30.3000.01732.68
7.1.20.2300.01332.75
7.1.10.2570.01715.03
7.1.00.1900.01314.80
7.0.200.3830.01314.85
7.0.190.3170.01314.77
7.0.180.2270.01314.55
7.0.170.2870.00314.51
7.0.160.2800.01014.27
7.0.150.2130.01314.38
7.0.140.0900.00714.35
7.0.130.1800.01314.58
7.0.120.1770.01714.57
7.0.110.2100.01314.42
7.0.100.2130.01714.59
7.0.90.2070.01714.25
7.0.80.1900.01014.44
7.0.70.1830.01314.38
7.0.60.2370.01014.40
7.0.50.2200.00714.72
7.0.40.2270.01014.58
7.0.30.2300.01014.46
7.0.20.1870.01314.44
7.0.10.2230.01014.51
7.0.00.1900.01714.47

preferences:
65.49 ms | 400 KiB | 5 Q