3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'id' => '4c44c3e074ffc928250576cc', 'name' => 'Salvation Army', 'contact' => array( 'phone' => '2122899617', 'formattedPhone' => '(212) 289-9617' ), 'location' => array ( 'address' => '26 E 125th St', 'crossStreet' => 'btw Madison & 5th Ave', 'lat' => '40.805853703834', 'lng' => '-73.941053819056', 'distance' => '53', 'postalCode' => '10035', 'cc' => 'US', 'city' => 'New York', 'state' => 'NY', 'country' => 'United States' ), 'categories' => Array ( [ 'id' => '4bf58dd8d48988d101951735', 'name' => 'Thrift / Vintage Store', 'pluralName' => 'Thrift / Vintage Stores', 'shortName' => 'Thrift / Vintage', 'icon' => array ( 'prefix' => 'https://ss1.4sqi.net/img/categories_v2/shops/default_', 'suffix' => '.png' ), 'primary' => '1', ] ), 'verified' => '', 'restricted' => '1', 'stats' => array ( 'checkinsCount' => '71', 'usersCount' => '46', 'tipCount' => '3' ), 'specials' => array ( 'count' => '0', 'items' => Array() ), 'hereNow' => array ( 'count' => '0', 'groups' => Array() ), 'referralId' => 'v-1393405742' ); class Venue { protected $id; protected $categories; protected $contact; protected $fourSquareVenueId; protected $location; protected $name; protected $statistics; public function __construct() { $this->categories = new Array(); } /** * Get id * * @return id $id */ public function getId() { return $this->id; } /** * Add category * * @param \Trist\Bundle\CommonBundle\Document\Venue\VenueCategory $category */ public function addCategory( $category) { $this->categories[] = $category; } /** * Remove category * * @param \Trist\Bundle\CommonBundle\Document\Venue\VenueCategory $category */ public function removeCategory($category) { $this->categories->removeElement($category); } /** * Get categories * * @return \Doctrine\Common\Collections\ArrayCollection $categories */ public function getCategories() { return $this->categories; } /** * Set contact * * @param \Trist\Bundle\CommonBundle\Document\Venue\VenueContact $contact * @return self */ public function setContact($contact) { $this->contact = $contact; return $this; } } $obj = json_decode(json_encode($arr)); /* $obj= new stdClass(); foreach ($arr as $k=> $v) { $obj->{$k} = $v; } */ print_r((new ReflectionObject(new Venue))->getMethods());

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.250.0130.04318.95
5.4.240.0130.04718.91
5.4.230.0030.05318.93
5.4.220.0070.06719.04
5.4.210.0070.05018.74
5.4.200.0030.06018.93
5.4.190.0070.05718.88
5.4.180.0100.05018.95
5.4.170.0130.06718.95
5.4.160.0070.05018.90
5.4.150.0100.08018.88
5.4.140.0100.04716.36
5.4.130.0070.04716.56
5.4.120.0130.04016.41
5.4.110.0030.05716.44
5.4.100.0170.04316.50
5.4.90.0000.05716.42
5.4.80.0070.04716.45
5.4.70.0070.04716.45
5.4.60.0170.04016.41
5.4.50.0070.04716.26
5.4.40.0000.05316.46
5.4.30.0100.04316.41
5.4.20.0070.06316.46
5.4.10.0000.08016.40
5.4.00.0130.04716.02
5.3.280.0100.04714.64
5.3.270.0270.06014.62
5.3.260.0200.04314.38
5.3.250.0100.05314.38
5.3.240.0100.04714.48
5.3.230.0170.04314.37
5.3.220.0170.04014.57
5.3.210.0070.05314.59
5.3.200.0070.04714.61
5.3.190.0070.05714.27
5.3.180.0070.05714.57
5.3.170.0070.07314.42
5.3.160.0000.05714.58
5.3.150.0100.04714.57
5.3.140.0030.05314.60
5.3.130.0200.04014.60
5.3.120.0100.05014.42
5.3.110.0130.06014.55
5.3.100.0070.05014.05
5.3.90.0100.04714.02
5.3.80.0000.07014.03
5.3.70.0170.04013.96
5.3.60.0070.05013.92
5.3.50.0100.04313.95
5.3.40.0000.05313.89
5.3.30.0170.04313.78
5.3.20.0200.05313.70
5.3.10.0130.06313.57
5.3.00.0070.05013.41

preferences:
136.01 ms | 1394 KiB | 7 Q