3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Event { private $propagationStopped = false; public function isPropagationStopped() { return $this->propagationStopped; } public function stopPropagation() { $this->propagationStopped = true; } } class AddFranchiseeEvent extends Event { const EVENT_ID = 'gtt.franchisee_my.event.add_franchisee'; private $franchisee; private $prefix; private $code; private $clientId; public function __construct(Franchisee $franchisee, $prefix, $code, $clientId) { $this->franchisee = $franchisee; $this->prefix = $prefix; $this->code = $code; $this->clientId = $clientId; } public function getFranchisee() { return $this->franchisee; } public function getPrefix() { return $this->prefix; } public function getCode() { return $this->code; } public function getClientId() { return $this->clientId; } } class Franchisee { protected $id; protected $parentId; protected $shortName; protected $fullName; public $branchId; protected $status; public function setStatus($status) { $this->status = $status; } public function getStatus() { return $this->status; } public function setFullName($fullName) { $this->fullName = $fullName; } public function getFullName() { return $this->fullName; } public function setId($id) { $this->id = $id; } public function getId() { return $this->id; } public function setParentId($parentId) { $this->parentId = $parentId; } public function getParentId() { return $this->parentId; } public function setShortName($shortName) { $this->shortName = $shortName; } public function getShortName() { return $this->shortName; } public function getBranchId() { return $this->branchId; } public function setBranchId($branchId) { $this->branchId = $branchId; } } $object = new Franchisee(); // new AddFranchiseeEvent(new Franchisee(), 'pref', 121, 12323); $object->setBranchId(100); echo json_encode($object); echo json_last_error();

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.0100.00318.79
8.3.30.0110.00419.01
8.3.20.0060.00320.25
8.3.10.0100.00023.53
8.3.00.0080.00019.07
8.2.170.0090.00622.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.17
8.2.110.0040.00422.08
8.2.100.0120.00019.64
8.2.90.0000.00819.23
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0030.01017.77
8.2.50.0080.00318.07
8.2.40.0090.00019.93
8.2.30.0080.00018.26
8.2.20.0000.00817.59
8.2.10.0040.00417.99
8.2.00.0050.00217.62
8.1.270.0130.00623.91
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00023.72
8.1.230.0090.00319.15
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0050.00517.35
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0030.00718.45
8.1.160.0040.00421.87
8.1.150.0050.00218.58
8.1.140.0000.00717.33
8.1.130.0000.00717.79
8.1.120.0030.00317.40
8.1.110.0000.00717.42
8.1.100.0000.00817.37
8.1.90.0000.00717.38
8.1.80.0070.00017.41
8.1.70.0070.00017.37
8.1.60.0040.00417.63
8.1.50.0080.00017.53
8.1.40.0030.00617.53
8.1.30.0060.00317.67
8.1.20.0000.00817.67
8.1.10.0040.00417.48
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0070.00017.05
8.0.280.0070.00018.50
8.0.270.0030.00317.22
8.0.260.0030.00317.29
8.0.250.0030.00316.97
8.0.240.0040.00416.88
8.0.230.0080.00016.78
8.0.220.0000.00716.74
8.0.210.0080.00016.75
8.0.200.0030.00316.86
8.0.190.0000.00916.86
8.0.180.0030.00516.89
8.0.170.0000.00716.91
8.0.160.0070.00016.73
8.0.150.0070.00016.82
8.0.140.0030.00516.82
8.0.130.0000.00613.30
8.0.120.0000.00816.81
8.0.110.0000.00816.81
8.0.100.0040.00416.83
8.0.90.0040.00416.71
8.0.80.0100.01016.79
8.0.70.0050.00316.88
8.0.60.0000.00816.71
8.0.50.0040.00416.95
8.0.30.0130.01017.05
8.0.20.0120.00817.40
8.0.10.0030.00416.82
8.0.00.0090.00916.75
7.4.330.0000.00615.09
7.4.320.0060.00016.38
7.4.300.0000.00616.44
7.4.290.0030.00516.58
7.4.280.0060.00316.61
7.4.270.0080.00016.59
7.4.260.0030.00316.39
7.4.250.0030.00516.58
7.4.240.0040.00416.56
7.4.230.0030.00316.69
7.4.220.0100.00716.61
7.4.210.0040.00916.72
7.4.200.0030.00316.42
7.4.190.0030.00316.65
7.4.160.0110.00516.39
7.4.150.0130.00317.40
7.4.140.0080.01317.86
7.4.130.0050.01416.58
7.4.120.0130.00516.61
7.4.110.0110.00916.45
7.4.100.0160.01216.29
7.4.90.0030.01416.39
7.4.80.0030.01319.39
7.4.70.0040.01216.45
7.4.60.0230.00016.25
7.4.50.0040.00416.34
7.4.40.0070.01316.58
7.4.30.0060.00916.35
7.4.10.0060.01315.18
7.4.00.0070.01115.01
7.3.330.0040.00313.13
7.3.320.0000.00513.07
7.3.310.0020.00516.26
7.3.300.0030.00316.21
7.3.290.0060.00916.39
7.3.280.0120.00516.24
7.3.270.0060.01217.40
7.3.260.0090.00916.30
7.3.250.0120.01016.43
7.3.240.0030.01416.38
7.3.230.0140.01016.39
7.3.210.0040.01216.20
7.3.200.0040.01219.39
7.3.190.0170.00016.34
7.3.180.0000.01416.38
7.3.170.0080.00816.54
7.3.160.0030.01316.24
7.3.130.0060.00915.00
7.3.120.0060.01114.90
7.3.110.0110.00814.87
7.3.100.0040.00914.78
7.3.90.0080.00514.81
7.3.80.0060.00914.76
7.3.70.0070.00414.80
7.3.60.0080.00614.94
7.3.50.0080.00714.58
7.3.40.0030.01214.78
7.3.30.0080.00714.68
7.3.20.0060.00716.66
7.3.10.0050.00916.58
7.3.00.0070.00516.40
7.2.330.0110.01416.65
7.2.320.0130.00516.66
7.2.310.0090.00916.78
7.2.300.0080.01116.71
7.2.290.0140.00316.40
7.2.260.0070.01015.20
7.2.250.0070.01214.96
7.2.240.0080.01015.18
7.2.230.0020.01315.05
7.2.220.0100.00715.15
7.2.210.0080.00715.04
7.2.200.0070.00714.97
7.2.190.0070.00514.98
7.2.180.0050.01015.22
7.2.170.0020.01015.03
7.2.160.0090.00615.04
7.2.150.0090.00916.78
7.2.140.0120.00416.98
7.2.130.0030.00916.74
7.2.120.0040.01116.84
7.2.110.0000.00916.93
7.2.100.0070.01016.66
7.2.90.0090.00316.95
7.2.80.0030.01216.97
7.2.70.0120.00316.89
7.2.60.0000.01417.03
7.2.50.0060.01017.00
7.2.40.0100.00717.01
7.2.30.0030.01217.00
7.2.20.0030.00916.88
7.2.10.0040.00716.84
7.2.00.0030.01018.24
7.1.330.0050.01015.75
7.1.320.0040.00915.84
7.1.310.0070.00715.58
7.1.300.0020.01015.60
7.1.290.0050.00715.70
7.1.280.0050.00915.79
7.1.270.0060.00915.62
7.1.260.0080.00415.59
7.1.250.0070.00715.61
7.1.240.0030.00915.73
7.1.230.0110.00415.57
7.1.220.0000.01215.77
7.1.210.0030.00915.66
7.1.200.0030.01015.60
7.1.190.0030.00915.89
7.1.180.0150.00015.83
7.1.170.0030.01015.73
7.1.160.0060.00915.73
7.1.150.0030.00915.80
7.1.140.0000.01015.76
7.1.130.0000.01515.99
7.1.120.0000.01415.81
7.1.110.0090.00015.46
7.1.100.0020.01016.98
7.1.90.0030.00815.79
7.1.80.0070.00715.61
7.1.70.0030.00816.50
7.1.60.0060.00917.63
7.1.50.0120.00416.38
7.1.40.0060.01015.80
7.1.30.0060.01115.73
7.1.20.0060.00915.75
7.1.10.0080.00815.63
7.1.00.0000.04519.21
7.0.330.0060.00315.40
7.0.320.0030.00615.39
7.0.310.0000.01515.47
7.0.300.0100.00715.20
7.0.290.0000.01615.41
7.0.280.0030.00615.45
7.0.270.0030.01315.50
7.0.260.0030.00515.28
7.0.250.0040.00415.47
7.0.240.0040.00815.05
7.0.230.0070.00415.36
7.0.220.0030.01315.54
7.0.210.0060.00615.57
7.0.200.0030.00615.84
7.0.190.0000.01415.50
7.0.180.0100.00715.14
7.0.170.0130.00315.30
7.0.160.0030.00615.51
7.0.150.0030.00715.14
7.0.140.0070.03518.62
7.0.130.0030.00715.42
7.0.120.0060.00315.30
7.0.110.0030.01015.34
7.0.100.0100.00315.49
7.0.90.0300.02917.63
7.0.80.0250.03317.70
7.0.70.0360.03817.52
7.0.60.0290.03717.59
7.0.50.0330.04017.98
7.0.40.0050.04716.84
7.0.30.0050.04416.81
7.0.20.0080.03116.77
7.0.10.0070.04516.71
7.0.00.0100.04316.61
5.6.400.0040.01114.66
5.6.390.0040.01214.43
5.6.380.0070.00714.43
5.6.370.0030.01014.69
5.6.360.0110.00614.61
5.6.350.0030.00514.32
5.6.340.0000.01414.46
5.6.330.0060.00914.59
5.6.320.0060.00614.68
5.6.310.0060.00914.39
5.6.300.0080.00814.13
5.6.290.0030.01214.27
5.6.280.0000.01414.40
5.6.270.0070.00314.38
5.6.260.0040.00714.33
5.6.250.0070.00714.28
5.6.240.0070.03517.67
5.6.230.0050.04617.60
5.6.220.0030.04617.54
5.6.210.0030.05017.43
5.6.200.0060.04317.66
5.6.190.0070.04717.80
5.6.180.0030.04717.68
5.6.170.0100.03817.74
5.6.160.0060.04117.80
5.6.150.0080.04017.79
5.6.140.0080.04517.68
5.6.130.0140.04217.69
5.6.120.0080.04317.77
5.6.110.0100.03917.63
5.6.100.0030.04117.64
5.6.90.0070.04617.74
5.6.80.0080.03017.37
5.6.70.0100.04017.29
5.6.60.0160.03617.25
5.6.50.0050.04417.46
5.6.40.0080.04017.29
5.6.30.0020.03417.39
5.6.20.0070.04117.41
5.6.10.0050.03817.38
5.6.00.0080.04217.38
5.5.380.0030.04617.25
5.5.370.0090.03417.42
5.5.360.0150.03217.33
5.5.350.0070.04417.41
5.5.340.0070.04517.52
5.5.330.0070.02917.68
5.5.320.0060.04617.65
5.5.310.0100.03417.58
5.5.300.0110.02917.54
5.5.290.0050.03917.74
5.5.280.0080.03517.34
5.5.270.0100.04017.65
5.5.260.0050.03917.68
5.5.250.0060.04417.35
5.5.240.0120.04017.13
5.5.230.0070.04317.19
5.5.220.0080.03817.41
5.5.210.0130.03317.40
5.5.200.0070.04417.07
5.5.190.0070.03717.21
5.5.180.0070.04517.31
5.5.170.0100.00314.40
5.5.160.0080.03917.20
5.5.150.0020.02817.24
5.5.140.0100.03317.20
5.5.130.0100.04017.13
5.5.120.0080.02517.34
5.5.110.0070.02917.21
5.5.100.0090.04317.14
5.5.90.0050.04617.26
5.5.80.0040.04417.05
5.5.70.0080.03917.27
5.5.60.0080.03816.90
5.5.50.0030.04517.20
5.5.40.0020.03217.15
5.5.30.0050.03817.23
5.5.20.0140.03317.16
5.5.10.0030.04317.12
5.5.00.0030.04417.25
5.4.450.0030.04315.69
5.4.440.0070.03715.73
5.4.430.0090.03515.67
5.4.420.0060.02315.57
5.4.410.0080.02315.66
5.4.400.0020.03415.45
5.4.390.0050.04715.61
5.4.380.0050.04015.50
5.4.370.0100.03615.60
5.4.360.0040.04415.55
5.4.350.0050.03315.57
5.4.340.0130.03315.55
5.4.330.0000.01011.98
5.4.320.0070.04115.43
5.4.310.0020.03415.50
5.4.300.0120.03615.50
5.4.290.0060.03915.50
5.4.280.0070.03815.55
5.4.270.0120.03315.55
5.4.260.0070.04315.43
5.4.250.0040.04615.41
5.4.240.0050.03515.54
5.4.230.0120.03515.41
5.4.220.0050.04015.50
5.4.210.0080.03815.43
5.4.200.0100.03815.55
5.4.190.0050.03715.55
5.4.180.0050.02915.40
5.4.170.0080.04215.42
5.4.160.0080.04015.52
5.4.150.0000.04415.52
5.4.140.0090.03214.20
5.4.130.0090.03614.20
5.4.120.0030.02314.22
5.4.110.0050.03014.23
5.4.100.0000.03414.21
5.4.90.0070.03714.21
5.4.80.0000.02914.22
5.4.70.0060.02014.27
5.4.60.0000.02314.16
5.4.50.0030.02514.23
5.4.40.0070.03214.17
5.4.30.0080.03814.22
5.4.20.0070.03514.21
5.4.10.0070.03914.23
5.4.00.0070.03713.87
5.3.290.0100.03313.38
5.3.280.0050.03613.36
5.3.270.0050.04513.33
5.3.260.0120.02813.34
5.3.250.0020.04413.34
5.3.240.0030.04113.35
5.3.230.0080.02013.29
5.3.220.0030.03213.35
5.3.210.0030.02513.34
5.3.200.0020.04113.25
5.3.190.0090.03713.25
5.3.180.0080.02513.29
5.3.170.0030.02513.28
5.3.160.0030.02513.32
5.3.150.0080.02713.31
5.3.140.0070.03813.28
5.3.130.0040.02413.34
5.3.120.0030.04213.26
5.3.110.0050.04013.30
5.3.100.0100.03813.05
5.3.90.0030.04013.02
5.3.80.0070.02913.07
5.3.70.0080.03813.02
5.3.60.0070.03712.97
5.3.50.0070.04213.00
5.3.40.0050.03812.99
5.3.30.0090.02512.92
5.3.20.0020.03812.84
5.3.10.0050.03912.82
5.3.00.0050.02912.77
5.2.170.0030.06711.32
5.2.160.0100.05311.20
5.2.150.0070.06311.32
5.2.140.0000.03311.23
5.2.130.0070.05711.16
5.2.120.0070.06011.24
5.2.110.0030.04311.16
5.2.100.0070.06011.15
5.2.90.0030.06011.20
5.2.80.0030.06011.04
5.2.70.0130.03711.11
5.2.60.0030.06011.19
5.2.50.0030.05011.15
5.2.40.0100.05010.95
5.2.30.0070.05711.05
5.2.20.0070.05710.98
5.2.10.0030.06310.89
5.2.00.0030.04310.88
5.1.60.0000.02710.06
5.1.50.0100.05310.08
5.1.40.0070.05310.07
5.1.30.0030.04710.42
5.1.20.0030.04010.32
5.1.10.0030.05710.14
5.1.00.0100.05010.18
5.0.50.0030.0338.48
5.0.40.0130.0378.50
5.0.30.0030.0578.25
5.0.20.0000.0308.32
5.0.10.0030.0308.20
5.0.00.0000.0408.30
4.4.90.0030.0337.54
4.4.80.0000.0237.54
4.4.70.0070.0337.54
4.4.60.0070.0277.54
4.4.50.0070.0207.54
4.4.40.0000.0277.54
4.4.30.0030.0337.54
4.4.20.0030.0177.54
4.4.10.0030.0337.54
4.4.00.0070.0277.54
4.3.110.0000.0377.54
4.3.100.0070.0207.54
4.3.90.0000.0337.54
4.3.80.0070.0237.54
4.3.70.0030.0137.54
4.3.60.0000.0177.54
4.3.50.0000.0177.54
4.3.40.0030.0337.54
4.3.30.0000.0177.54
4.3.20.0030.0137.54
4.3.10.0030.0137.54
4.3.00.0000.0177.54

preferences:
42.42 ms | 400 KiB | 5 Q