@ 2014-02-26T13:19:00Z <?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());
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
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).
Version System time (s) User time (s) Memory (MiB) 5.4.25 0.013 0.043 18.95 5.4.24 0.013 0.047 18.91 5.4.23 0.003 0.053 18.93 5.4.22 0.007 0.067 19.04 5.4.21 0.007 0.050 18.74 5.4.20 0.003 0.060 18.93 5.4.19 0.007 0.057 18.88 5.4.18 0.010 0.050 18.95 5.4.17 0.013 0.067 18.95 5.4.16 0.007 0.050 18.90 5.4.15 0.010 0.080 18.88 5.4.14 0.010 0.047 16.36 5.4.13 0.007 0.047 16.56 5.4.12 0.013 0.040 16.41 5.4.11 0.003 0.057 16.44 5.4.10 0.017 0.043 16.50 5.4.9 0.000 0.057 16.42 5.4.8 0.007 0.047 16.45 5.4.7 0.007 0.047 16.45 5.4.6 0.017 0.040 16.41 5.4.5 0.007 0.047 16.26 5.4.4 0.000 0.053 16.46 5.4.3 0.010 0.043 16.41 5.4.2 0.007 0.063 16.46 5.4.1 0.000 0.080 16.40 5.4.0 0.013 0.047 16.02 5.3.28 0.010 0.047 14.64 5.3.27 0.027 0.060 14.62 5.3.26 0.020 0.043 14.38 5.3.25 0.010 0.053 14.38 5.3.24 0.010 0.047 14.48 5.3.23 0.017 0.043 14.37 5.3.22 0.017 0.040 14.57 5.3.21 0.007 0.053 14.59 5.3.20 0.007 0.047 14.61 5.3.19 0.007 0.057 14.27 5.3.18 0.007 0.057 14.57 5.3.17 0.007 0.073 14.42 5.3.16 0.000 0.057 14.58 5.3.15 0.010 0.047 14.57 5.3.14 0.003 0.053 14.60 5.3.13 0.020 0.040 14.60 5.3.12 0.010 0.050 14.42 5.3.11 0.013 0.060 14.55 5.3.10 0.007 0.050 14.05 5.3.9 0.010 0.047 14.02 5.3.8 0.000 0.070 14.03 5.3.7 0.017 0.040 13.96 5.3.6 0.007 0.050 13.92 5.3.5 0.010 0.043 13.95 5.3.4 0.000 0.053 13.89 5.3.3 0.017 0.043 13.78 5.3.2 0.020 0.053 13.70 5.3.1 0.013 0.063 13.57 5.3.0 0.007 0.050 13.41
preferences:dark mode live preview
136.01 ms | 1394 KiB | 7 Q