3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Event { /** * @var Boolean Whether no further event listeners should be triggered */ private $propagationStopped = false; /** * Returns whether further event listeners should be triggered. * * @see Event::stopPropagation * @return Boolean Whether propagation was already stopped for this event. * * @api */ public function isPropagationStopped() { return $this->propagationStopped; } /** * Stops the propagation of the event to further event listeners. * * If multiple event listeners are connected to the same event, no * further event listener will be triggered once any trigger calls * stopPropagation(). * * @api */ public function stopPropagation() { $this->propagationStopped = true; } } class AddFranchiseeEvent extends Event { /** * Event identifier */ const EVENT_ID = 'gtt.franchisee_my.event.add_franchisee'; /** * New franchisee * * @var Franchisee */ private $franchisee; /** * Franchisee prefix * * @var string */ private $prefix; /** * 1C code * * @var string */ private $code; /** * Franchisee client ID * * @var integer */ private $clientId; /** * Constructor * * @param Franchisee $franchisee new franchisee, must be already stored and have ID * @param string $prefix prefix * @param string $code 1C code * @param int $clientId client ID */ public function __construct(Franchisee $franchisee, $prefix, $code, $clientId) { $this->franchisee = $franchisee; $this->prefix = $prefix; $this->code = $code; $this->clientId = $clientId; } /** * Gets managed franchisee entity * * @return Franchisee */ public function getFranchisee() { return $this->franchisee; } /** * Gets prefix * * @return string */ public function getPrefix() { return $this->prefix; } /** * Gets 1C code * * @return string */ public function getCode() { return $this->code; } /** * Gets franchisee client ID * * @return int */ public function getClientId() { return $this->clientId; } } /** * Class Franchisee * @package Gtt\Module\FranchiseeMy\Entity * * @Map\Entity * * @Map\Table(name="franchisee") */ class Franchisee { /** * ID * * @var int * * @Map\Id * * @Map\Column(name="id", type="integer") * * @Map\GeneratedValue(strategy="AUTO") */ private $id; /** * Parent ID * * @var int * * @Map\Column(name="parent_id", type="integer") */ private $parentId; /** * Short name * * @var string * * @Map\Column(name="short_name", type="string") */ private $shortName; /** * Short name * * @var string * * @Map\Column(name="full_name", type="string") */ private $fullName; /** * Branch ID * * @var int * * @Map\Column(name="branch_id", type="integer") */ private $branchId; /** * Status * * @var int * * @Map\Column(name="status_id", type="integer") */ private $status; /** * Setter * * @param int $status * * @return void */ public function setStatus($status) { $this->status = $status; } /** * Getter * * @return int */ public function getStatus() { return $this->status; } /** * Sets full name * * @param string $fullName */ public function setFullName($fullName) { $this->fullName = $fullName; } /** * Gets full name * * @return string */ public function getFullName() { return $this->fullName; } /** * Sets ID * * @param int $id */ public function setId($id) { $this->id = $id; } /** * Gets ID * * @return int */ public function getId() { return $this->id; } /** * Sets parent ID * * @param int $parentId */ public function setParentId($parentId) { $this->parentId = $parentId; } /** * Gets parent ID * * @return int */ public function getParentId() { return $this->parentId; } /** * Sets short name * * @param string $shortName */ public function setShortName($shortName) { $this->shortName = $shortName; } /** * Gets short name * * @return string */ public function getShortName() { return $this->shortName; } /** * Gets branch ID * * @return int */ public function getBranchId() { return $this->branchId; } /** * Sets branch ID * * @param int $branchId branch ID * * @return void */ public function setBranchId($branchId) { $this->branchId = $branchId; } } $object = new AddFranchiseeEvent(new Franchisee(), 'pref', 121, 12323); echo json_encode($object);

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.0120.00918.97
8.3.30.0070.00719.09
8.3.20.0040.00420.33
8.3.10.0050.00523.48
8.3.00.0040.00420.77
8.2.170.0070.00722.96
8.2.160.0070.00720.52
8.2.150.0000.00724.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00818.91
8.2.110.0060.00322.15
8.2.100.0050.00517.91
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00818.04
8.2.50.0030.00618.07
8.2.40.0040.00419.82
8.2.30.0080.00018.20
8.2.20.0070.00017.68
8.2.10.0040.00418.04
8.2.00.0060.00317.57
8.1.270.0040.00422.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00323.96
8.1.230.0040.00719.09
8.1.220.0050.00517.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0090.00318.53
8.1.160.0000.00721.92
8.1.150.0040.00418.51
8.1.140.0040.00417.40
8.1.130.0040.00417.89
8.1.120.0070.00017.42
8.1.110.0050.00317.31
8.1.100.0000.00717.30
8.1.90.0000.00717.43
8.1.80.0060.00317.29
8.1.70.0080.00017.35
8.1.60.0040.00417.60
8.1.50.0060.00317.43
8.1.40.0030.00517.43
8.1.30.0030.00617.62
8.1.20.0000.00817.49
8.1.10.0040.00417.64
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0050.00318.51
8.0.270.0030.00317.27
8.0.260.0060.00017.26
8.0.250.0040.00416.93
8.0.240.0030.00317.00
8.0.230.0000.00716.88
8.0.220.0070.00016.98
8.0.210.0000.00916.95
8.0.200.0030.00316.91
8.0.190.0030.00616.94
8.0.180.0080.00016.84
8.0.170.0000.00716.91
8.0.160.0000.00716.89
8.0.150.0050.00316.96
8.0.140.0040.00416.78
8.0.130.0030.00313.34
8.0.120.0030.00516.90
8.0.110.0040.00416.95
8.0.100.0000.00816.85
8.0.90.0000.00816.90
8.0.80.0060.01516.90
8.0.70.0000.00816.85
8.0.60.0000.00816.94
8.0.50.0000.00716.80
8.0.30.0070.01217.13
8.0.20.0140.00917.40
8.0.10.0040.00416.91
8.0.00.0120.00916.79
7.4.330.0000.00515.00
7.4.320.0060.00016.57
7.4.300.0000.00616.43
7.4.290.0030.00516.53
7.4.280.0080.00016.55
7.4.270.0070.00016.63
7.4.260.0000.00716.64
7.4.250.0040.00416.53
7.4.240.0040.00316.53
7.4.230.0040.00416.72
7.4.220.0030.01416.51
7.4.210.0140.00016.70
7.4.200.0040.00416.68
7.4.190.0040.00416.68
7.4.160.0110.01116.42
7.4.150.0100.00717.40
7.4.140.0080.01017.86
7.4.130.0140.00316.54
7.4.120.0110.00716.45
7.4.110.0160.00316.59
7.4.100.0100.01016.52
7.4.90.0040.01316.57
7.4.80.0090.01419.39
7.4.70.0120.00616.50
7.4.60.0060.01216.61
7.4.50.0050.00316.48
7.4.40.0070.01416.53
7.4.30.0100.01116.51
7.4.00.0160.00015.23
7.3.330.0040.00413.05
7.3.320.0050.00013.27
7.3.310.0030.00316.26
7.3.300.0040.00416.25
7.3.290.0060.01316.20
7.3.280.0090.00816.24
7.3.270.0080.00917.40
7.3.260.0070.01116.50
7.3.250.0110.00616.27
7.3.240.0090.00916.28
7.3.230.0060.00916.50
7.3.210.0090.00916.30
7.3.200.0030.01319.39
7.3.190.0150.00316.14
7.3.180.0030.01316.23
7.3.170.0030.01216.34
7.3.160.0100.00716.14
7.3.120.0070.01114.82
7.3.00.0040.00716.59
7.2.330.0100.01016.88
7.2.320.0030.01316.83
7.2.310.0090.00916.84
7.2.300.0070.01016.54
7.2.290.0060.01216.87
7.2.130.0000.01316.68
7.2.120.0040.00716.88
7.2.110.0090.00316.94
7.2.100.0030.00916.91
7.2.90.0030.01216.96
7.2.80.0030.00716.88
7.2.70.0030.00616.76
7.2.60.0130.00016.61
7.2.50.0060.00616.91
7.2.40.0040.00817.03
7.2.30.0140.00616.96
7.2.20.0030.01116.98
7.2.10.0130.00317.10
7.2.00.0060.00618.15
7.1.250.0070.00315.81
7.1.240.0080.00415.99
7.1.230.0070.00315.84
7.1.220.0030.00915.82
7.1.210.0050.00515.74
7.1.200.0060.00615.67
7.1.190.0040.01115.57
7.1.180.0030.01015.60
7.1.170.0090.00315.70
7.1.160.0030.00615.77
7.1.150.0080.00515.61
7.1.140.0080.00315.47
7.1.130.0070.00315.75
7.1.120.0090.00615.47
7.1.110.0030.00715.82
7.1.100.0020.00717.05
7.1.90.0030.00515.48
7.1.80.0040.00415.40
7.1.70.0040.01016.38
7.1.60.0050.01217.78
7.1.50.0070.00816.26
7.1.40.0120.00315.96
7.1.30.0060.00615.66
7.1.20.0040.00415.87
7.1.10.0070.00715.74
7.1.00.0060.03719.17
7.0.330.0040.01115.32
7.0.320.0080.00015.61
7.0.310.0090.00415.45
7.0.300.0090.00615.32
7.0.290.0070.00315.33
7.0.280.0000.01415.30
7.0.270.0030.01014.89
7.0.260.0000.00715.43
7.0.250.0060.00315.23
7.0.240.0070.00715.18
7.0.230.0000.01015.22
7.0.220.0110.00015.38
7.0.210.0070.00715.34
7.0.200.0070.00516.11
7.0.190.0040.00715.45
7.0.180.0040.00815.37
7.0.170.0060.00615.10
7.0.160.0030.00715.21
7.0.150.0060.00315.51
7.0.140.0050.03918.61
7.0.130.0070.01115.26
7.0.120.0030.01415.35
7.0.110.0320.05017.66
7.0.100.0250.02517.64
7.0.90.0300.04617.65
7.0.80.0250.04317.59
7.0.70.0270.03817.68
7.0.60.0260.02317.67
7.0.50.0200.02517.71
7.0.40.0050.04416.60
7.0.30.0060.02816.63
7.0.20.0030.02216.66
7.0.10.0070.03816.60
7.0.00.0100.02616.64
5.6.380.0070.00414.38
5.6.370.0040.00814.46
5.6.360.0040.00414.32
5.6.350.0070.00714.50
5.6.340.0030.00714.62
5.6.330.0030.00714.13
5.6.320.0060.00313.94
5.6.310.0000.01314.45
5.6.300.0000.01414.23
5.6.290.0000.01014.57
5.6.280.0050.04017.74
5.6.270.0060.00614.24
5.6.260.0070.04217.59
5.6.250.0050.04517.33
5.6.240.0080.04417.50
5.6.230.0070.04217.46
5.6.220.0070.04517.48
5.6.210.0050.04117.46
5.6.200.0090.03217.44
5.6.190.0030.04617.49
5.6.180.0070.02017.42
5.6.170.0030.02517.71
5.6.160.0100.04217.42
5.6.150.0030.02817.60
5.6.140.0080.05017.60
5.6.130.0070.04317.38
5.6.120.0130.03517.51
5.6.110.0050.04417.26
5.6.100.0030.04417.35
5.6.90.0050.04517.43
5.6.80.0080.04117.24
5.6.70.0070.03417.05
5.6.60.0070.04717.17
5.6.50.0070.03717.26
5.6.40.0070.03917.07
5.6.30.0050.03217.14
5.6.20.0030.02917.17
5.6.10.0080.04117.17
5.6.00.0150.03217.12
5.5.380.0030.04314.30
5.5.370.0070.04214.46
5.5.360.0050.04014.30
5.5.350.0030.02014.39
5.5.340.0070.04014.50
5.5.330.0080.03314.49
5.5.320.0020.02614.57
5.5.310.0060.03814.65
5.5.300.0050.04514.76
5.5.290.0070.04014.53
5.5.280.0050.04314.71
5.5.270.0050.04114.63
5.5.260.0030.03814.51
5.5.250.0030.02614.33
5.5.240.0030.04514.21
5.5.230.0050.03214.26
5.5.220.0080.04014.24
5.5.210.0030.04214.21
5.5.200.0070.02314.38
5.5.190.0080.03814.25
5.5.180.0050.03814.30
5.5.170.0030.00311.11
5.5.160.0050.04414.20
5.5.150.0070.02314.13
5.5.140.0040.02314.34
5.5.130.0050.04014.37
5.5.120.0100.03114.11
5.5.110.0050.03914.31
5.5.100.0050.03614.04
5.5.90.0040.02014.32
5.5.80.0050.03114.31
5.5.70.0030.02214.16
5.5.60.0070.02914.13
5.5.50.0080.04114.37
5.5.40.0030.03714.08
5.5.30.0070.03314.11
5.5.20.0080.02014.28
5.5.10.0050.03914.27
5.5.00.0040.02514.16
5.4.450.0030.04415.12
5.4.440.0020.04015.11
5.4.430.0060.03315.13
5.4.420.0060.02115.26
5.4.410.0080.03515.14
5.4.400.0080.02015.10
5.4.390.0030.03315.00
5.4.380.0100.03715.09
5.4.370.0070.03915.15
5.4.360.0000.04514.95
5.4.350.0100.02215.02
5.4.340.0050.03615.00
5.4.330.0060.00610.92
5.4.320.0070.03115.27
5.4.310.0100.03515.01
5.4.300.0080.03815.26
5.4.290.0080.02714.95
5.4.280.0100.03415.04
5.4.270.0050.02515.01
5.4.260.0060.03715.15
5.4.250.0030.03815.02
5.4.240.0050.04115.05
5.4.230.0060.04014.94
5.4.220.0070.03915.07
5.4.210.0050.03814.99
5.4.200.0050.04315.03
5.4.190.0050.02215.07
5.4.180.0050.04114.97
5.4.170.0050.02014.94
5.4.160.0030.02515.00
5.4.150.0030.03615.04
5.4.140.0000.03313.77
5.4.130.0020.02713.75
5.4.120.0030.03313.69
5.4.110.0050.04013.77
5.4.100.0050.01813.76
5.4.90.0050.03213.75
5.4.80.0080.03713.81
5.4.70.0030.04113.76
5.4.60.0020.02913.71
5.4.50.0050.03913.69
5.4.40.0040.02313.62
5.4.30.0070.02413.79
5.4.20.0030.03613.60
5.4.10.0080.03813.88
5.4.00.0090.03713.52
5.3.290.0070.03712.81
5.3.280.0040.02312.81
5.3.270.0030.02512.89
5.3.260.0090.03412.88
5.3.250.0050.02212.77
5.3.240.0030.04112.76
5.3.230.0050.02912.76
5.3.220.0080.03812.86
5.3.210.0050.03512.76
5.3.200.0060.03312.74
5.3.190.0050.04412.75
5.3.180.0080.03712.68
5.3.170.0070.03912.72
5.3.160.0050.04012.86
5.3.150.0010.03612.80
5.3.140.0030.02212.74
5.3.130.0050.03512.73
5.3.120.0060.03612.76
5.3.110.0030.03712.67
5.3.100.0050.03812.55
5.3.90.0050.03612.52
5.3.80.0050.04012.46
5.3.70.0080.03712.58
5.3.60.0030.02112.47
5.3.50.0030.03312.44
5.3.40.0030.04012.47
5.3.30.0050.03712.40
5.3.20.0070.03912.38
5.3.10.0020.04212.31
5.3.00.0050.02512.32
5.2.170.0020.03012.05
5.2.160.0030.03412.05
5.2.150.0050.03312.05
5.2.140.0000.02512.05
5.2.130.0080.02212.05
5.2.120.0030.01812.05
5.2.110.0030.03312.05
5.2.100.0030.02012.05
5.2.90.0050.03012.05
5.2.80.0000.03512.05
5.2.70.0060.02712.05
5.2.60.0060.02512.05
5.2.50.0050.02312.05
5.2.40.0050.02712.05
5.2.30.0050.03312.05
5.2.20.0050.01812.05
5.2.10.0060.02512.05
5.2.00.0030.03512.05
5.1.60.0050.01512.05
5.1.50.0040.02612.05
5.1.40.0030.02012.05
5.1.30.0050.02912.05
5.1.20.0040.01512.05
5.1.10.0020.03012.05
5.1.00.0060.02812.05
5.0.50.0020.02512.05
5.0.40.0020.02112.05
5.0.30.0030.03412.05
5.0.20.0020.01612.05
5.0.10.0030.02612.05
5.0.00.0000.02812.05
4.4.90.0060.01312.05
4.4.80.0030.01812.05
4.4.70.0030.01012.05
4.4.60.0050.01812.05
4.4.50.0070.01212.05
4.4.40.0000.02812.05
4.4.30.0020.02012.05
4.4.20.0030.01812.05
4.4.10.0020.01712.05
4.4.00.0020.02712.05
4.3.110.0050.00812.05
4.3.100.0000.01212.05
4.3.90.0020.01512.05
4.3.80.0030.01512.05
4.3.70.0050.01312.05
4.3.60.0030.01512.05
4.3.50.0020.01112.05
4.3.40.0020.02212.05
4.3.30.0050.01712.05
4.3.20.0080.00512.05
4.3.10.0000.01212.05
4.3.00.0020.01912.05

preferences:
44.99 ms | 400 KiB | 5 Q