php interface ZZ class implements ZZ class public function __construct

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
interface ZZ{};
class A implements ZZ{
}
class B{
public function __construct(ZZ $a){
var_dump($a);
}
}
$zz = "zzz"; //new A();
$z = new B($zz);
/*
$a = "string";
$a['test'] = 'bla';
var_dump($a);
*/
echo "\n";