PHP Sucks?!
date post
28-Nov-2014Category
Technology
view
23.452download
1
Embed Size (px)
description
Transcript of PHP Sucks?!
- 1. PHP Sucks?!Simon Neidhold, Stefan Wiegreffe, ICANS GmbHwww.icans-gmbh.com 1
- 2. ber unsSimon Neidhold Stefan Wiegree So&ware Engineer Team Lead Web Development simon.neidhold@icans-gmbh.com stefan.wiegree@icans-gmbh.com @sneidhold @swiegree 2 2
- 3. PHP sucks?! 3 3
- 4. Die Nadel im Heuhaufen 4 4
- 5. to, _to_, 2 5 5
- 6. Unterm Strich zhlt die Semantik 6 6
- 7. Next: Wordpress 7 7
- 8. Standard-Template: index.php!! !!! !! !! ! !! ! ! !! [...]! 8 8
- 9. the_post() the_post() ist deklariert in Zeile 773 in wp-includes/query.php: /**! * Iterate the post index in the loop.! *! * @see WP_Query::the_post()! * @since 1.5.0! * @uses $wp_query! */!function the_post() {! global $wp_query;!! $wp_query->the_post();!}! 9 9
- 10. WTF?? WP_Query::the_post() ist deklariert in Zeile 2778 in wp-includes/query.php: class WP_Query {!! /**! * Sets up the current post.! *! * Retrieves the next post, sets up the post, sets the in the loop! * property to true.! *! * @since 1.5.0! * @access public! * @uses $post! * @uses do_action_ref_array() Calls loop_start if loop has just started! */! function the_post() {! global $post;! $this->in_the_loop = true;! ! if ( $this->current_post == -1 ) // loop has just started! do_action_ref_array(loop_start, array(&$this));! ! $post = $this->next_post();! setup_postdata($post);! }!!} 10 10
- 11. Next: Debugging!