3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php // ** GENERATED by NI_Mysqlpm_Util_ViewClass ** - do not edit /** * Generated view class. View class definition in User§Class * <p/> */ class User { /** * id: int(10) not null auto_increment * * @var int */ public $id; /** * Country of the user. * <p> * country_id: int(10) not null * * @var int */ public $countryId; /** * firstname: varchar(765) * * @var string */ public $firstname; /** * lastname: varchar(765) * * @var string */ public $lastname; /** * Customer number (trigger will generate random on new) * <p> * number: varchar(96) * * @var string */ public $number; /** * ssn: varchar(96) * * @var string */ public $ssn; /** * Set of on/off information * <p> * flags: set('active','super_admin','retail_admin','marketing_admin') = 'active' not null * * @var NI_Set */ public $flags; /** * Associated Navision store * <p> * store_id: int(10) * * @var int */ public $storeId; /** * @return mixed; */ public function getKey() { return $this->id; } /** * @return mixed; */ public function getIndexKey() { return $this->id; } } $user = new User(); $user->id = 1234567; $thisObj = new stdClass(); $user2 = new User(); $user2->id = 1234567; $thisObj->user = $user2; if($user->id != $thisObj->user->id){ echo "Does not work"; } else { echo "works"; }

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.0.10.0130.08320.06
7.0.00.0170.06720.25
5.6.160.0070.06020.55
5.6.150.0000.04318.19
5.6.140.0230.06318.18
5.6.130.0100.08318.18
5.6.120.0170.06020.98
5.6.110.0030.05321.04
5.6.100.0070.03721.08
5.6.90.0130.08021.00
5.6.80.0200.06720.48
5.5.300.0130.07717.95
5.5.290.0100.03317.95
5.5.280.0130.04720.68
5.5.270.0130.05720.86
5.5.260.0070.08020.67
5.5.250.0100.06720.46
5.5.240.0170.07720.06

preferences:
140.3 ms | 1394 KiB | 7 Q