Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì ? <?php class A { static $word = "hello"; static function hello() { print static ::$word; } } class B extends A { static $word = "bye"; } B::hello(); ?>
Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì? <?php class A { }; class B1 extends A { }; class_alias('A', 'B2'); b1=newB1;echogetclass(b1); b2=newB2;echogetclass(b2); ?>
Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì ? <?php class Object { function Object(entity) { $entity->name = "John"; } } class Entity { var $name = "Maria"; } entity = new Entity(); obj = new Object(entity); print $entity->name; ?>
Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì? <?php class number { public a = 10; public b = 20; private c = 30; } numbers = new number(); foreach (numbers as var => $value) { echo "$value "; } ?>
Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì? <?php interface foo { } class_alias('foo', 'bar'); echo interface_exists('bar') ? 'yes' : 'no'; ?>
Xem đoạn mã lệnh sau đây. Sau khi thực hiện đoạn mã trên kết quả hiển thị sẽ là gì? <?php values = array( 10, 20, '0', '10hello', 'hello10' ); echo array_sum(values); ?>