top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Could you have a OOPS methodology access to array in PHP

0 votes

Do u know about planning or implementing OOP methdology access to array methods in PHP in future. Like show code later:

$a = new Array();
$p = $a->pop();

$b = Array::fill(fill_char="*", count=20);
posted Sep 3, 2014 by Gurminder

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

I think you mean this?

Please comment if looking something different.

answer Sep 3, 2014 by Ahmed Patel
Similar Questions
+1 vote

I am working on an OOP project, and cannot decide which way to follow when I have to write a simple function.

For example, I want to write a function which generates a random string. In an OOP environtment, it is a matter of course to create a static class and a static method for that. But why? Isn't it more elegant, if I implement such a simple thing as a plain function? Not to mention that a function is more efficient than a class method.

So, in object-oriented programming, what is the best practice to implement such a simple function?

+1 vote

Can someone provide the details about class and objects in oops?