3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MakeMeCMS_Listener_interface { public function __construct($method, $args); public function setFeedback($arg, $type); public function feedback(); } class MakeMeCMS_Listener implements MakeMeCMS_Listener_interface { protected $_feedback; protected $_type; public function __construct($method, $args = '') { if(method_exists($this, $method)) { if($args != '') { if(preg_match('#\,#', $args)) { $args = explode(',', $args); } $this->$method($args); } else { $this->$method(); } } } public function setFeedback($arg,$type) { $this->_feedback = $arg; $this->_type = $type; } public function feedback() { return $this->_feedback; } private function test(array $args) { $string = ''; foreach($args as $arg) { $string .= $arg.' '; } $this->setFeedback($string, 'text/plain'); } } class myAddon_Listener extends MakeMeCMS_Listener implements MakeMeCMS_Listener_interface { public function __construct($method, $args = '') { if(method_exists($this, $method)) { if($args != '') { if(preg_match('#\,#', $args)) { $args = explode(',', $args); } $this->$method($args); } else { $this->$method(); } } } public function setFeedback($arg, $type) { parent::setFeedback($arg, $type); } public function feedback() { return parent::_feedback; } private function test2() { echo('Hello World!'); } } $listener = new MakeMeCMS_Listener('test', 'foo,bar'); echo($listener->feedback()); $customListener = new myAddon_Listener('test2'); echo($customListener->feedback());

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.60.0150.00016.75
8.3.50.0160.00618.43
8.3.40.0110.00419.13
8.3.30.0150.00618.97
8.3.20.0090.00020.32
8.3.10.0080.00023.54
8.3.00.0040.00419.51
8.2.180.0150.00318.91
8.2.170.0090.00622.96
8.2.160.0140.00020.57
8.2.150.0080.00024.18
8.2.140.0140.00024.66
8.2.130.0040.00419.52
8.2.120.0040.00426.35
8.2.110.0030.00619.20
8.2.100.0090.00317.88
8.2.90.0040.00419.26
8.2.80.0040.00417.97
8.2.70.0040.00417.84
8.2.60.0080.00018.16
8.2.50.0050.00318.07
8.2.40.0000.00819.34
8.2.30.0050.00320.73
8.2.20.0000.00918.10
8.2.10.0000.00818.04
8.2.00.0020.00518.21
8.1.280.0150.00325.92
8.1.270.0040.01223.97
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0090.00022.19
8.1.230.0080.00317.66
8.1.220.0080.00017.80
8.1.210.0030.00618.77
8.1.200.0000.00917.47
8.1.190.0050.00317.48
8.1.180.0000.00818.10
8.1.170.0000.00918.89
8.1.160.0040.00422.05
8.1.150.0030.00518.97
8.1.140.0000.00819.62
8.1.130.0000.00717.78
8.1.120.0040.00417.60
8.1.110.0060.00317.63
8.1.100.0000.00717.68
8.1.90.0070.00017.59
8.1.80.0060.00317.61
8.1.70.0000.00717.66
8.1.60.0060.00317.64
8.1.50.0060.00317.61
8.1.40.0050.00617.65
8.1.30.0040.00417.81
8.1.20.0060.00317.84
8.1.10.0040.00417.74
8.1.00.0040.00417.69
8.0.300.0050.00218.77
8.0.290.0070.00017.13
8.0.280.0030.00318.47
8.0.270.0000.00717.20
8.0.260.0000.00617.23
8.0.250.0000.00717.25
8.0.240.0000.00717.19
8.0.230.0000.00717.02
8.0.220.0030.00317.11
8.0.210.0030.00617.03
8.0.200.0000.00617.14
8.0.190.0050.00217.22
8.0.180.0030.00517.04
8.0.170.0030.00617.03
8.0.160.0040.00417.16
8.0.150.0040.00417.05
8.0.140.0000.00717.05
8.0.130.0000.00613.50
8.0.120.0030.00517.07
8.0.110.0030.00517.11
8.0.100.0040.00417.18
8.0.90.0080.00017.18
8.0.80.0030.01317.05
8.0.70.0020.00517.10
8.0.60.0040.00417.00
8.0.50.0080.00017.01
8.0.30.0130.00417.37
8.0.20.0130.00817.40
8.0.10.0040.00417.26
8.0.00.0120.00617.02
7.4.330.0000.00616.71
7.4.320.0000.00716.74
7.4.300.0030.00316.75
7.4.290.0040.00416.73
7.4.280.0000.00716.73
7.4.270.0000.00716.73
7.4.260.0000.00716.73
7.4.250.0040.00416.71
7.4.240.0040.00416.78
7.4.230.0030.00316.84
7.4.220.0090.01016.86
7.4.210.0080.00616.87
7.4.200.0030.00316.90
7.4.160.0090.00616.75
7.4.150.0090.00917.40
7.4.140.0050.01317.86
7.4.130.0090.01316.71
7.4.120.0090.00916.66
7.4.110.0140.00416.84
7.4.100.0030.01716.80
7.4.90.0090.00916.53
7.4.80.0060.01119.39
7.4.70.0120.00916.65
7.4.60.0100.00716.70
7.4.50.0100.00316.64
7.4.40.0110.00716.64
7.4.30.0060.01616.82
7.4.00.0120.00314.99
7.3.330.0030.00313.48
7.3.320.0060.00013.52
7.3.310.0030.00416.57
7.3.300.0030.00316.41
7.3.290.0070.01016.52
7.3.280.0090.00916.56
7.3.270.0060.01417.40
7.3.260.0130.00316.62
7.3.250.0090.00816.63
7.3.240.0110.00816.63
7.3.230.0100.00716.41
7.3.210.0060.01016.78
7.3.200.0030.01316.73
7.3.190.0090.00916.65
7.3.180.0070.01016.52
7.3.170.0120.00416.60
7.3.160.0040.01416.68
7.2.330.0030.01417.05
7.2.320.0150.00316.97
7.2.310.0130.00316.96
7.2.300.0070.01016.95
7.2.290.0120.00616.96
7.2.60.0060.00617.05
7.2.00.0030.00719.75
7.1.200.0000.01215.86
7.1.100.0030.01018.15
7.1.70.0040.00717.38
7.1.60.0070.01719.36
7.1.50.0000.01417.13
7.1.00.0030.07722.49
7.0.200.0000.00916.84
7.0.60.0070.07019.93
7.0.50.0070.07717.94
7.0.40.0030.09320.20
7.0.30.0400.07720.21
7.0.20.0300.05320.26
7.0.10.0100.06320.31
7.0.00.0070.08720.33
5.6.280.0070.02720.92
5.6.210.0070.06320.52
5.6.200.0100.03318.29
5.6.190.0070.04720.61
5.6.180.0470.04720.46
5.6.170.0230.05020.51
5.6.160.0000.09320.54
5.6.150.0000.08718.19
5.6.140.0100.07318.17
5.6.130.0070.07318.24
5.6.120.0030.04321.16
5.6.110.0030.04320.99
5.6.100.0170.08021.00
5.6.90.0070.07021.04
5.6.80.0130.06020.52
5.5.350.4200.04020.42
5.5.340.0100.04018.07
5.5.330.0030.06320.31
5.5.320.0130.06020.31
5.5.310.0130.05020.19
5.5.300.0170.02718.08
5.5.290.0030.07717.98
5.5.280.0030.08020.89
5.5.270.0070.05320.96
5.5.260.0100.05720.91
5.5.250.0070.07720.61
5.5.240.0170.07020.15

preferences:
52.35 ms | 400 KiB | 5 Q