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 = []; } /** * 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)
8.3.40.0110.00418.71
8.3.30.0080.00618.91
8.3.20.0040.00420.29
8.3.10.0090.00021.95
8.3.00.0040.00422.52
8.2.170.0140.00022.96
8.2.160.0110.00420.53
8.2.150.0040.00424.18
8.2.140.0080.01224.66
8.2.130.0070.01126.16
8.2.120.0000.00819.43
8.2.110.0100.00022.25
8.2.100.0130.00319.09
8.2.90.0030.00519.16
8.2.80.0060.00319.46
8.2.70.0000.00817.38
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0020.00517.89
8.2.20.0070.00017.61
8.2.10.0020.00517.66
8.2.00.0000.00817.61
8.1.270.0040.00420.07
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0070.00319.06
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0000.01017.36
8.1.190.0040.00417.54
8.1.180.0040.00418.75
8.1.170.0060.00318.52
8.1.160.0070.00022.16
8.1.150.0040.00718.52
8.1.140.0000.00817.36
8.1.130.0000.00717.88
8.1.120.0070.00017.41
8.1.110.0060.00317.34
8.1.100.0000.00717.29
8.1.90.0040.00417.36
8.1.80.0000.00717.32
8.1.70.0030.00317.32
8.1.60.0050.00317.56
8.1.50.0030.00617.43
8.1.40.0000.00817.43
8.1.30.0060.00317.64
8.1.20.0000.00817.53
8.1.10.0030.00617.54
8.1.00.0080.00017.48
8.0.300.0030.00318.77
8.0.290.0000.00717.05
8.0.280.0030.00518.41
8.0.270.0030.00317.27
8.0.260.0030.00316.78
8.0.250.0030.00316.89
8.0.240.0000.00816.91
8.0.230.0000.00716.92
8.0.220.0030.00316.83
8.0.210.0070.00016.81
8.0.200.0060.00017.01
8.0.190.0030.00616.80
8.0.180.0030.00516.80
8.0.170.0000.00816.86
8.0.160.0040.00416.91
8.0.150.0030.00316.85
8.0.140.0000.00916.55
8.0.130.0000.00513.27
8.0.120.0040.00416.83
8.0.110.0000.00716.84
8.0.100.0040.00416.88
8.0.90.0030.00516.66
8.0.80.0090.00616.90
8.0.70.0040.00416.68
8.0.60.0000.00716.94
8.0.50.0040.00416.92
8.0.30.0100.00817.18
8.0.20.0060.01217.40
8.0.10.0020.00516.86
8.0.00.0110.00816.64
7.4.330.0030.00315.05
7.4.320.0030.00316.58
7.4.300.0000.00616.64
7.4.290.0070.00016.45
7.4.280.0030.00316.51
7.4.270.0030.00316.54
7.4.260.0000.00816.61
7.4.250.0080.00016.59
7.4.240.0040.00416.57
7.4.230.0030.00316.74
7.4.220.0140.00316.68
7.4.210.0070.00916.48
7.4.200.0050.00216.41
7.4.190.0070.00016.52
7.4.160.0030.01316.50
7.4.150.0100.00717.40
7.4.140.0170.00317.86
7.4.130.0080.01316.43
7.4.120.0110.00716.54
7.4.110.0060.01316.48
7.4.100.0090.01616.51
7.4.90.0090.00916.47
7.4.80.0110.00719.39
7.4.70.0100.00616.38
7.4.60.0080.00816.44
7.4.50.0030.00616.36
7.4.40.0070.00422.77
7.4.30.0060.01316.27
7.4.10.0070.01015.02
7.4.00.0070.01015.01
7.3.330.0060.00013.29
7.3.320.0000.00613.27
7.3.310.0000.00716.33
7.3.300.0000.00716.17
7.3.290.0070.00716.32
7.3.280.0070.01216.29
7.3.270.0130.00417.40
7.3.260.0060.01116.56
7.3.250.0090.00916.29
7.3.240.0110.00616.58
7.3.230.0080.00816.39
7.3.210.0070.01016.52
7.3.200.0100.00719.39
7.3.190.0110.00616.39
7.3.180.0120.00916.55
7.3.170.0030.01616.66
7.3.160.0120.00316.39
7.3.130.0110.00714.79
7.3.120.0080.00914.58
7.3.110.0080.00814.84
7.3.100.0030.01114.56
7.3.90.0050.00814.77
7.3.80.0080.00514.72
7.3.70.0070.00814.71
7.3.60.0060.00814.67
7.3.50.0050.00914.63
7.3.40.0060.00314.80
7.3.30.0030.00814.87
7.3.20.0050.00516.55
7.3.10.0080.00416.46
7.3.00.0010.01316.56
7.2.330.0150.00916.72
7.2.320.0100.00716.48
7.2.310.0120.01216.81
7.2.300.0000.01616.63
7.2.290.0080.00816.78
7.2.260.0060.00615.02
7.2.250.0040.01415.15
7.2.240.0060.00715.01
7.2.230.0080.00814.89
7.2.220.0050.01015.04
7.2.210.0090.00315.03
7.2.200.0050.00415.02
7.2.190.0080.00814.91
7.2.180.0050.00914.78
7.2.170.0070.00514.92
7.2.160.0060.00915.00
7.2.150.0060.00916.96
7.2.140.0100.00516.83
7.2.130.0080.00616.76
7.2.120.0050.00516.88
7.2.110.0080.00616.80
7.2.100.0030.01216.72
7.2.90.0100.00616.77
7.2.80.0080.00716.63
7.2.70.0060.00916.93
7.2.60.0070.00416.78
7.2.50.0080.00516.67
7.2.40.0100.00516.94
7.2.30.0050.01016.92
7.2.20.0090.00316.69
7.2.10.0050.00516.75
7.2.00.0080.00416.76
7.1.330.0050.00715.69
7.1.320.0110.00315.84
7.1.310.0030.00815.66
7.1.300.0050.00715.82
7.1.290.0050.00715.65
7.1.280.0000.01415.59
7.1.270.0030.00815.63
7.1.260.0040.00715.72
7.1.250.0070.00815.88
7.1.240.0000.01115.54
7.1.230.0070.00415.82
7.1.220.0060.00615.76
7.1.210.0100.00715.48
7.1.200.0030.00915.75
7.1.190.0030.01015.39
7.1.180.0040.00415.51
7.1.170.0030.00615.66
7.1.160.0030.01615.88
7.1.150.0090.00915.52
7.1.140.0030.01015.85
7.1.130.0000.01115.50
7.1.120.0060.01115.83
7.1.110.0030.00916.00
7.1.100.0110.00415.76
7.1.90.0000.01215.77
7.1.80.0110.00415.51
7.1.70.0070.00316.48
7.1.60.0080.00917.79
7.1.50.0100.00816.21
7.1.40.0060.01015.61
7.1.30.0100.00715.77
7.1.20.0070.01015.74
7.1.10.0000.01315.72
7.1.00.0030.02219.07
7.0.330.0070.00715.43
7.0.320.0000.01015.48
7.0.310.0030.00715.12
7.0.300.0030.01315.42
7.0.290.0060.01015.43
7.0.280.0000.01715.39
7.0.270.0040.00415.56
7.0.260.0000.01615.50
7.0.250.0030.00615.40
7.0.240.0050.00315.22
7.0.230.0040.01215.19
7.0.220.0030.00815.53
7.0.210.0000.01415.47
7.0.200.0040.00916.03
7.0.190.0130.00315.51
7.0.180.0120.00315.47
7.0.170.0060.00615.59
7.0.160.0060.01215.52
7.0.150.0090.00615.48
7.0.140.0030.04418.72
7.0.130.0060.00315.39
7.0.120.0030.00715.25
7.0.110.0140.00315.22
7.0.100.0100.00615.29
7.0.90.0220.04917.66
7.0.80.0260.02917.50
7.0.70.0270.04517.66
7.0.60.0100.04217.61
7.0.50.0100.02517.95
7.0.40.0100.04316.88
7.0.30.0060.03716.79
7.0.20.0080.02316.81
7.0.10.0050.02416.71
7.0.00.0070.04016.81
5.6.400.0000.01114.34
5.6.390.0040.01114.43
5.6.380.0060.00914.70
5.6.370.0000.01514.69
5.6.360.0090.01014.66
5.6.350.0060.01114.32
5.6.340.0060.01014.48
5.6.330.0030.01014.20
5.6.320.0110.00414.54
5.6.310.0080.00814.63
5.6.300.0030.01014.21
5.6.290.0030.00614.48
5.6.280.0050.04117.52
5.6.270.0070.01014.77
5.6.260.0100.00714.55
5.6.250.0030.01014.14
5.6.240.0080.04517.66
5.6.230.0060.03517.39
5.6.220.0100.04417.45
5.6.210.0070.03017.48
5.6.200.0120.02017.85
5.6.190.0040.04217.66
5.6.180.0080.04217.67
5.6.170.0020.03017.73
5.6.160.0070.04317.77
5.6.150.0080.02917.72
5.6.140.0130.03817.88
5.6.130.0030.04517.75
5.6.120.0070.04117.67
5.6.110.0070.03917.93
5.6.100.0050.04917.78
5.6.90.0020.04717.51
5.6.80.0070.02617.44
5.6.70.0060.02517.28
5.6.60.0120.03717.53
5.6.50.0080.02817.48
5.6.40.0100.03817.46
5.6.30.0050.02217.43
5.6.20.0050.03017.25
5.6.10.0100.04017.35
5.6.00.0070.04517.37
5.5.380.0030.04517.45
5.5.370.0080.04517.49
5.5.360.0080.04817.35
5.5.350.0030.04817.40
5.5.340.0050.04417.65
5.5.330.0050.03817.64
5.5.320.0100.04517.60
5.5.310.0100.03117.70
5.5.300.0050.04917.64
5.5.290.0050.05017.64
5.5.280.0090.02917.60
5.5.270.0120.02417.54
5.5.260.0060.02817.67
5.5.250.0050.02517.50
5.5.240.0070.02817.23
5.5.230.0030.02717.30
5.5.220.0100.03717.38
5.5.210.0050.03317.12
5.5.200.0100.04317.21
5.5.190.0030.02717.17
5.5.180.0030.04117.28
5.5.170.0070.00714.00
5.5.160.0060.04517.21
5.5.150.0070.03417.04
5.5.140.0100.03117.29
5.5.130.0060.02617.32
5.5.120.0050.04717.25
5.5.110.0070.02617.40
5.5.100.0080.04117.20
5.5.90.0070.03917.21
5.5.80.0030.02617.14
5.5.70.0100.03517.20
5.5.60.0070.02517.24
5.5.50.0070.04017.14
5.5.40.0050.02517.09
5.5.30.0050.03017.08
5.5.20.0070.02717.22
5.5.10.0120.03017.22
5.5.00.0050.04317.09
5.4.450.0080.02515.70
5.4.440.0030.03415.66
5.4.430.0080.04315.79
5.4.420.0100.03815.70
5.4.410.0080.03715.72
5.4.400.0070.02315.59
5.4.390.0090.03915.50
5.4.380.0020.02615.63
5.4.370.0070.02215.58
5.4.360.0020.04715.62
5.4.350.0120.02715.58
5.4.340.0030.04215.65
5.4.330.0060.00612.13
5.4.320.0060.04215.63
5.4.310.0130.03515.51
5.4.300.0100.03415.67
5.4.290.0090.03615.63
5.4.280.0000.03115.65
5.4.270.0090.04115.59
5.4.260.0070.03715.61
5.4.250.0040.04115.58
5.4.240.0030.03315.63
5.4.230.0020.03015.62
5.4.220.0120.03515.50
5.4.210.0030.04215.57
5.4.200.0020.03815.64
5.4.190.0050.04115.51
5.4.180.0050.04015.59
5.4.170.0040.02515.66
5.4.160.0070.04215.61
5.4.150.0050.03715.59
5.4.140.0050.03814.15
5.4.130.0080.03714.28
5.4.120.0050.03714.26
5.4.110.0050.03814.21
5.4.100.0060.02714.22
5.4.90.0070.02214.28
5.4.80.0050.02614.26
5.4.70.0070.03814.33
5.4.60.0120.03314.32
5.4.50.0080.03514.20
5.4.40.0030.02514.29
5.4.30.0070.03714.31
5.4.20.0110.02114.25
5.4.10.0130.03414.22
5.4.00.0050.02313.98
5.3.290.0030.03513.38
5.3.280.0070.02213.35
5.3.270.0080.03313.33
5.3.260.0050.04013.36
5.3.250.0070.04213.36
5.3.240.0040.04413.28
5.3.230.0090.03813.34
5.3.220.0070.03713.35
5.3.210.0040.02513.34
5.3.200.0080.02713.33
5.3.190.0080.03613.26
5.3.180.0060.03313.34
5.3.170.0080.03513.26
5.3.160.0030.04013.26
5.3.150.0040.04313.34
5.3.140.0050.05213.34
5.3.130.0070.04213.32
5.3.120.0030.03313.33
5.3.110.0070.03813.32
5.3.100.0080.04112.99
5.3.90.0020.04113.07
5.3.80.0060.03813.00
5.3.70.0030.02313.00
5.3.60.0070.03512.94
5.3.50.0050.04012.96
5.3.40.0040.03912.92
5.3.30.0050.04812.91
5.3.20.0080.02312.79
5.3.10.0060.03212.85
5.3.00.0070.03212.86
5.2.170.0030.05711.09
5.2.160.0070.05711.11
5.2.150.0030.06311.14
5.2.140.0030.06311.09
5.2.130.0000.06310.95
5.2.120.0070.03310.94
5.2.110.0070.04011.02
5.2.100.0030.04710.89
5.2.90.0030.06711.10
5.2.80.0030.04310.91
5.2.70.0030.06010.93
5.2.60.0070.07011.01
5.2.50.0130.04310.94
5.2.40.0130.02310.96
5.2.30.0070.05710.97
5.2.20.0100.05010.91
5.2.10.0030.05710.93
5.2.00.0070.03310.64
5.1.60.0000.0509.84
5.1.50.0070.05010.00
5.1.40.0070.0409.98
5.1.30.0070.04710.27
5.1.20.0070.04710.21
5.1.10.0030.03310.12
5.1.00.0030.05310.07
5.0.50.0070.0208.60
5.0.40.0000.0238.40
5.0.30.0030.0438.29
5.0.20.0000.0278.04
5.0.10.0030.0178.22
5.0.00.0000.0338.05
4.4.90.0000.0276.98
4.4.80.0000.0376.98
4.4.70.0100.0336.98
4.4.60.0000.0376.98
4.4.50.0030.0276.98
4.4.40.0070.0436.98
4.4.30.0070.0176.98
4.4.20.0030.0276.98
4.4.10.0100.0136.98
4.4.00.0000.0436.98
4.3.110.0000.0176.98
4.3.100.0000.0176.98
4.3.90.0030.0136.98
4.3.80.0000.0276.98
4.3.70.0000.0176.98
4.3.60.0000.0176.98
4.3.50.0000.0176.98
4.3.40.0030.0206.98
4.3.30.0000.0176.98
4.3.20.0030.0136.98
4.3.10.0000.0176.98
4.3.00.0000.0176.98

preferences:
43.92 ms | 400 KiB | 5 Q