3v4l.org

run code in 300+ PHP versions simultaneously
<?php // From https://core.trac.wordpress.org/browser/trunk/wp-admin/includes/list-table.php?rev=15491. class WP_List_Table { /** * Various information about the current table * * @since 3.1.0 * @var array * @access private */ var $_args; /** * Various information needed for displaying the pagination * * @since 3.1.0 * @var array * @access private */ var $_pagination_args = array(); /** * The current screen * * @since 3.1.0 * @var object * @access protected */ var $screen; /** * Cached bulk actions * * @since 3.1.0 * @var array * @access private */ var $_actions; /** * Cached pagination output * * @since 3.1.0 * @var string * @access private */ var $_pagination; /** * Constructor. The child class should call this constructor from it's own constructor * * @param array $args An associative array with information about the current table * @access protected */ function WP_List_Table( $args = array() ) {} } function run_test() { $obj = new WP_List_Table(); echo "\n ***** TEST WP 3.1 CODE ***** \n\n\n"; // __get() echo "** Test get **\n"; echo "Defined property: "; var_dump( $obj->_args ); echo "Dynamic property: "; var_dump( $obj->_dynamic_property ); // __isset() echo "\n\n ** Test `isset()` **\n"; echo "Defined property: "; var_dump( isset( $obj->_args ) ); echo "Dynamic property: "; var_dump( isset( $obj->_dynamic_property ) ); // __set() echo "\n\n ** Test set **\n"; $new_value = array( 'test' ); $obj->_args = $new_value; $obj->_dynamic_property = $new_value; echo "With magic methods: "; var_dump( $obj->_args ); echo "Dynamic property: "; var_dump( $obj->_dynamic_property ); // Unset. unset( $obj->_args ); unset( $obj->_dynamic_property ); echo "\n\n ** Test get after `unset()` **\n"; echo "Defined property: "; var_dump( $obj->_args ); echo "Dynamic property: "; var_dump( $obj->_dynamic_property ); echo "\n\n ** Test `isset()` after `unset()` **\n"; echo "Defined property: "; var_dump( isset( $obj->_args ) ); echo "Dynamic property: "; var_dump( isset( $obj->_dynamic_property ) ); echo "\n\n ** Test set after `unset()` **\n"; $new_value = array( 'test after an unset' ); $obj->_args = $new_value; $obj->_dynamic_property = $new_value; echo "Defined property: "; var_dump( $obj->_args ); echo "Dynamic property: "; var_dump( $obj->_dynamic_property ); echo "\n\n ** Test `isset()` after `unset()` and set **\n"; echo "Defined property: "; var_dump( isset( $obj->_args ) ); echo "Dynamic property: "; var_dump( isset( $obj->_dynamic_property ) ); } run_test();

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.110.0000.00916.75
8.3.100.0070.01424.06
8.3.90.0090.00026.77
8.3.80.0000.00916.88
8.3.70.0120.00316.58
8.3.60.0000.01518.58
8.3.50.0160.00616.68
8.3.40.0110.00423.79
8.3.30.0000.01420.34
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.230.0150.00620.94
8.2.220.0090.00037.54
8.2.210.0090.00926.77
8.2.200.0050.00516.63
8.2.190.0060.01216.74
8.2.180.0060.01018.54
8.2.170.0090.00619.13
8.2.160.0000.01522.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0060.00320.87
8.2.110.0070.00420.39
8.2.100.0000.01020.35
8.1.290.0090.00018.88
8.1.280.0140.00725.92
8.1.270.0100.00624.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00318.61
8.1.230.0100.00018.63
8.1.200.0090.00479.33
5.2.170.0040.00479.33

preferences:
30.78 ms | 406 KiB | 6 Q