String in php is a class?

8

String in java is a special class, where you can instantiate the object only by assigning a value without using the reserved word new . But in php when initializing a variable with a text, can we say that we are instantiating an object of class String?

    
asked by anonymous 09.04.2015 / 06:15

1 answer

9

No. In PHP, string is a of the eight primitive types available. When you assign a string to a variable, you can not invoke methods on it. autoboxing does not occur in a corresponding object type.     

09.04.2015 / 06:33