Difference between double colon ( :: ) and new syntax in PHP

  php

What is the difference between using scope resolution operator (::) and using new class in PHP ?

for example

$view = new ExampleClass();
$data = $view->ExampleMethod();

And

$data = ExampleClass::ExampleMethod();

Which is the best practice to use ?

Source: Ask PHP

LEAVE A COMMENT