3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WP_Term { public $data = array(); } $wp_term = new WP_Term( new stdClass() ); echo 'Testing if the $data dynamic property is accessible when iterating the WP_Term\'s object properties.' . PHP_EOL; foreach ( $wp_term as $property => $value ) { echo "Key: $property" . PHP_EOL; } echo PHP_EOL; echo 'Testing if the $data dynamic property is accessible when calling WP_Term::get_object_vars()' . PHP_EOL; var_dump( get_object_vars( $wp_term ) );

preferences:
24.96 ms | 405 KiB | 5 Q