Maldives ... the sunny side of life
매직메서드 시작
string(3) "foo"
array(1) {
[0]=>
string(4) "test"
}
string(3) "foo"
array(2) {
[0]=>
string(114) "나는 정적메소드이다 foo() 메소드가 없으니 __callStatic() 매직 메소드가 호출 될 것이다."
[1]=>
int(0)
}
array(1) {
[0]=>
string(6) "SHELLY"
}
__call()과 __callStatic()는 주로 런타임을 만들 때 사용해준다.
매직메서드 끝
매직프로퍼티 시작
message 프로퍼티가 존재합니다.
나는 set값을 출력합니다.
매직프로퍼티 끝
직렬화 시작
string(49) "O:1:"C":1:{s:10:" C message";s:11:"Hello World";}"
string(11) "C::__wakeup"
object(C)#69 (1) {
["message":"C":private]=>
string(11) "Hello World"
}
번외로 인터페이를 시리얼 라이즈 할 수 있는 기능을 추가할 수 있는데 그 방법은..아래 주석이다..
거의 안쓰인다고 보면 된다. 이는 php 8.1에서는 비권장!!!
직렬화 끝