3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $query = "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = %s " . "ORDER BY CHAR_LENGTH(meta_value) DESC, meta_value DESC LIMIT 5";
Output for 7.2.0
Notice: Undefined variable: wpdb in /in/vopPb on line 2 Notice: Trying to get property 'postmeta' of non-object in /in/vopPb on line 2
Output for 5.0.4 - 7.1.10
Notice: Undefined variable: wpdb in /in/vopPb on line 2 Notice: Trying to get property of non-object in /in/vopPb on line 2
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: wpdb in /in/vopPb on line 2 Notice: Trying to get property of non-object in /in/vopPb on line 2
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: wpdb in /in/vopPb on line 2