3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Element { /** * Constructor function. Must pass existing config, or leave as * is for new element, where the default will be used instead. * * @param array $config Element configuration. */ public function __construct( $config = [] ); /** * Get the definition of the Element. * * @return array An array with 'title', 'description' and 'type' */ public static function get_definition(); /** * Get Element config variable. * * @return array Associative array of Element Config. */ public function get_config(); /** * Set Element config variable. * * @param array $config New configuration variable. * * @return void */ public function set_config( $config ); } abstract class Base implements Element { /** * Element configuration variable * * @var array */ protected $config = []; /** * Get Element config variable. * * @return array Associative array of Element Config. */ public function get_config() { return $this->config; } /** * Create an eForm Element instance * * @param array $config Element config. */ public function __construct( $config = [] ) { $this->set_config( $config ); } } class MyElement extends Base { public static function get_definition() { return [ 'type' => 'MyElement', ]; } public function set_config( $config ) { // Do something here $this->config = $config; } } $element = new MyElement( [ 'foo' => 'bar', ] ); print_r( $element->get_config() );

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.00418.43
8.3.50.0070.01318.00
8.3.40.0110.01118.70
8.3.30.0130.00718.72
8.3.20.0040.00421.95
8.3.10.0070.00023.58
8.3.00.0080.00019.31
8.2.180.0060.00925.92
8.2.170.0100.01018.97
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0080.00821.80
8.2.130.0040.00426.16
8.2.120.0080.00019.14
8.2.110.0090.00419.13
8.2.100.0060.00617.78
8.2.90.0040.00417.91
8.2.80.0030.00619.11
8.2.70.0040.00417.63
8.2.60.0080.00017.63
8.2.50.0000.00818.10
8.2.40.0110.00318.19
8.2.30.0060.00718.25
8.2.20.0090.00417.74
8.2.10.0110.00417.74
8.2.00.0100.00317.75
8.1.270.0040.00424.02
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00617.48
8.1.230.0080.00319.01
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0030.00717.53
8.1.190.0030.00617.35
8.1.180.0080.00018.10
8.1.170.0080.00718.54
8.1.160.0110.00318.02
8.1.150.0090.00418.06
8.1.140.0110.00217.65
8.1.130.0090.00417.57
8.1.120.0060.00817.55
8.1.110.0090.00517.54
8.1.100.0080.00517.55
8.1.90.0090.00417.53
8.1.80.0090.00517.56
8.1.70.0080.00617.59
8.1.60.0060.01017.61
8.1.50.0090.00617.61
8.1.40.0130.00417.53
8.1.30.0110.00417.56
8.1.20.0080.01017.55
8.1.10.0120.00617.51
8.1.00.0120.00517.48
8.0.300.0000.00721.95
8.0.290.0090.00016.75
8.0.280.0120.00117.91
8.0.270.0070.00617.48
8.0.260.0090.00417.31
8.0.250.0140.00217.36
8.0.240.0110.00317.41
8.0.230.0100.00417.41
8.0.220.0070.00717.38
8.0.210.0060.00717.38
8.0.200.0100.00417.40
8.0.190.0100.00417.36
8.0.180.0080.00617.40
8.0.170.0120.00217.22
8.0.160.0100.00317.19
8.0.150.0100.00517.21
8.0.140.0090.00517.19
8.0.130.0090.00516.34
8.0.120.0080.00517.17
8.0.110.0070.00617.19
8.0.100.0100.00317.21
8.0.90.0060.00817.17
8.0.80.0100.00717.18
8.0.70.0120.00417.18
8.0.60.0120.00317.22
8.0.50.0080.00617.19
8.0.30.0130.00517.16
8.0.20.0120.00517.32
8.0.10.0150.00417.31
8.0.00.0090.00917.03
7.4.330.0070.00316.93
7.4.320.0040.00817.22
7.4.300.0070.00517.24
7.4.290.0050.00717.25
7.4.280.0110.00317.01
7.4.270.0090.00616.90
7.4.260.0090.00417.07
7.4.250.0070.00717.06
7.4.240.0080.00517.04
7.4.230.0110.00116.83
7.4.220.0090.00517.03
7.4.210.0110.00416.98
7.4.200.0090.00417.00
7.4.190.0090.00717.22
7.4.180.0110.00317.23
7.4.160.0100.00616.86
7.4.150.0120.00417.03
7.4.140.0110.00817.43
7.4.130.0090.00816.79
7.4.120.0110.00716.73
7.4.110.0060.01016.88
7.4.100.0110.00716.80
7.4.90.0100.00716.71
7.4.80.0110.00617.03
7.4.70.0110.00616.56
7.4.60.0110.00716.67
7.4.50.0110.00616.67
7.4.40.0100.00816.67
7.4.30.0110.00716.63
7.4.20.0110.00716.63
7.4.10.0130.00516.41
7.4.00.0100.00816.27
7.3.330.0110.00416.15
7.3.320.0100.00416.21
7.3.310.0100.00316.95
7.3.300.0120.00416.93
7.3.290.0080.00616.95
7.3.280.0110.00716.96
7.3.270.0100.00816.87
7.3.260.0120.00816.71
7.3.250.0120.00716.80
7.3.240.0090.00816.67
7.3.230.0100.00816.79
7.3.220.0130.00616.75
7.3.210.0110.00816.65
7.3.200.0130.00416.60
7.3.190.0110.00716.50
7.3.180.0110.00816.63
7.3.170.0120.00716.55
7.3.160.0100.00716.63
7.3.150.0110.00716.62
7.3.140.0110.00816.55
7.3.130.0130.00516.41
7.3.120.0100.00916.27
7.3.110.0080.01016.08
7.3.100.0080.00915.97
7.3.90.0100.00616.01
7.3.80.0070.00915.97
7.3.70.0100.00715.99
7.3.60.0100.00715.96
7.3.50.0110.00715.81
7.3.40.0090.00815.81
7.3.30.0100.00615.79
7.3.20.0090.00716.23
7.3.10.0120.00816.20
7.3.00.0100.00716.19
7.2.340.0170.00416.91
7.2.330.0130.00716.81
7.2.320.0100.01016.67
7.2.310.0120.00916.70
7.2.300.0110.00916.77
7.2.290.0130.00616.69
7.2.280.0120.00716.72
7.2.270.0130.00716.71
7.2.260.0120.00816.53
7.2.250.0100.00916.36
7.2.240.0110.00816.31
7.2.230.0110.00816.21
7.2.220.0100.00816.05
7.2.210.0110.00716.13
7.2.200.0120.00716.21
7.2.190.0100.00816.18
7.2.180.0120.00716.01
7.2.170.0090.00916.04
7.2.160.0110.00716.06
7.2.150.0110.00816.40
7.2.140.0150.00716.42
7.2.130.0120.00716.38
7.2.120.0150.00516.33
7.2.110.0120.00816.38
7.2.100.0130.00716.43
7.2.90.0120.00916.36
7.2.80.0140.00716.37
7.2.70.0110.00816.38
7.2.60.0170.00916.44
7.2.50.0120.00916.44
7.2.40.0130.00916.63
7.2.30.0500.00816.61
7.2.20.0540.00916.61
7.2.10.0160.01116.55
7.2.00.0210.00916.55
7.1.330.0150.00715.70
7.1.320.0120.00915.65
7.1.310.0140.00615.59
7.1.300.0120.00815.54
7.1.290.0150.00615.58
7.1.280.0180.00715.48
7.1.270.0150.00815.48
7.1.260.0120.00915.47
7.1.250.0160.00815.41
7.1.240.0170.00715.31
7.1.230.0150.00815.43
7.1.220.0150.00815.36
7.1.210.0190.00515.41
7.1.200.0160.00915.39
7.1.190.0170.00615.42
7.1.180.0200.00815.37
7.1.170.0140.00915.34
7.1.160.0190.00915.65
7.1.150.0150.00815.58
7.1.140.0560.00815.59
7.1.130.0210.01015.54
7.1.120.0180.00815.57
7.1.110.0170.00815.47
7.1.100.0150.00915.53
7.1.90.0320.00815.37
7.1.80.0420.00815.48
7.1.70.0350.01015.35
7.1.60.0370.00817.64
7.1.50.0370.00917.63
7.1.40.0310.01017.55
7.1.30.0320.01017.56
7.1.20.0300.00917.58
7.1.10.0270.00915.30
7.1.00.0190.00915.35
7.0.330.0190.00815.10
7.0.320.0180.00615.67
7.0.310.0190.00515.66
7.0.300.0160.00815.59
7.0.290.0170.00815.68
7.0.280.0230.00715.61
7.0.270.0170.00815.67
7.0.260.0170.00715.58
7.0.250.0160.00815.70
7.0.240.0200.00615.68
7.0.230.0200.00715.69
7.0.220.0180.00615.67
7.0.210.0180.00615.66
7.0.200.0240.00715.67
7.0.190.0150.00915.67
7.0.180.0380.00715.72
7.0.170.0210.00615.72
7.0.160.0160.00815.66
7.0.150.0170.00815.70
7.0.140.0150.00915.68
7.0.130.0140.01115.66
7.0.120.0210.00615.66
7.0.110.0240.00715.71
7.0.100.0170.00915.65
7.0.90.0190.00515.71
7.0.80.0160.00915.65
7.0.70.0210.00915.64
7.0.60.0150.00915.67
7.0.50.0180.00815.62
7.0.40.0180.00615.62
7.0.30.0160.00715.65
7.0.20.0160.00715.64
7.0.10.0170.00615.61
7.0.00.0160.00915.58
5.6.400.0140.00915.68
5.6.390.0140.01015.62
5.6.380.0140.00915.63
5.6.370.0170.00916.24
5.6.360.0160.00916.22
5.6.350.0160.00916.20
5.6.340.0150.00916.24
5.6.330.0160.00916.23
5.6.320.0160.00816.25
5.6.310.0170.01016.25
5.6.300.0170.00916.21
5.6.290.0150.00916.27
5.6.280.0170.00816.24
5.6.270.0190.00516.35
5.6.260.0140.01016.23
5.6.250.0150.01016.24
5.6.240.0160.01016.28
5.6.230.0170.01016.24
5.6.220.0200.01216.24
5.6.210.0170.00816.23
5.6.200.0170.00916.28
5.6.190.0140.01116.29
5.6.180.0170.01016.21
5.6.170.0170.00816.22
5.6.160.0140.01016.16
5.6.150.0150.00916.23
5.6.140.0140.01116.23
5.6.130.0160.00916.23
5.6.120.0180.00816.30
5.6.110.0160.01016.26
5.6.100.0160.00816.22
5.6.90.0160.00916.16
5.6.80.0160.00816.21
5.6.70.0150.00816.30
5.6.60.0140.01016.30
5.6.50.0180.00716.17
5.6.40.0140.01016.22
5.6.30.0160.00916.19
5.6.20.0140.01116.19
5.6.10.0190.00616.23
5.6.00.0140.01116.23

preferences:
81.48 ms | 400 KiB | 5 Q