[wp-trac] [WordPress Trac] #21402: Remove PHP4 methods, format consistently

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 11 23:07:57 UTC 2012


#21402: Remove PHP4 methods, format consistently
----------------------------+------------------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Cache           |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------------

Comment (by wonderboymusic):

 in 5.3 it's flush > shutdown > destruct

 {{{
 register_shutdown_function( 'my_shutdown' );
 register_shutdown_function( 'ob_end_flush' );

 function my_shutdown() {
         error_log( 'shutdown' );
 }

 class foo {
         function bar( $buffer ) {
                 return $buffer;
         }

         function __destruct() {
                 error_log( 'destruct' );
         }
 }

 $GLOBALS['fb'] = new foo;

 function foo_bar($buffer) {
         error_log( 'flush' );
         $GLOBALS['fb']->bar( $buffer );
         return $buffer;
 }

 ob_start('foo_bar');
 echo "This works.";
 exit();
 }}}

 Is it the same in PHP 5.2.6?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21402#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list