3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait UserLevel(){ public function get($level = 'one'){ $this->where('user', $level)->get(); } } trait SpecialUser(){ public function get(){ $this->where('special','yes')->get(); } } Class GetUser{ use UserLevel, SpecialUser; } $user = new GetUser; $user->get() //Ideally I want the methods should be chained as $this->where('special','yes') //->where('user','one')->get();

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.2.60.0650.00914.83
7.2.50.0220.01214.85
7.2.40.0100.01015.02
7.2.30.0110.01215.25
7.2.20.0410.00715.30
7.2.10.0360.00815.16
7.2.00.0300.01015.20
7.1.170.0280.00913.63
7.1.160.0370.01016.67
7.1.150.0190.01416.60
7.1.140.1800.01416.82
7.1.130.0140.01116.85
7.1.120.0170.01216.81
7.1.110.1370.00815.87
7.1.100.0130.00815.80
7.1.90.0270.01115.91
7.1.80.0150.00915.71
7.1.70.0250.01214.99
7.1.60.0590.01433.23
7.1.50.0270.01232.75
7.1.40.0260.01332.43
7.1.30.0230.01332.62
7.1.20.1600.01232.59
7.1.10.1440.01314.42
7.1.00.1520.00914.52

preferences:
152.18 ms | 1187 KiB | 7 Q