David Flores
#Linux #Drupal #Symfony #WebDeveloper #Silex #OpenSource
<HTML>
<BODY>
<MARQUEE>
<FONT COLOR="#FF0000">
<SCRIPT LANGUAGE="PHP">
<?php
echo "Hola mundo de PHP, estamos en onda.";
?>
</SCRIPT>
</FONT>
</MARQUEE>
</BODY>
<HTML>
<ul id="navigation">
{% for item in navigation %}
<li>
<a href="{{ item.href }}">
{{ item.caption }}
</a>
</li>
{% endfor %}
</ul>
<h1>{{ page_title }}</h1>
{{ variable }}
<?php
include("../librerias/conexion.php");
include("../librerias/fckeditor/fckeditor.php");
include_once("../librerias/html.php");
include_once("../librerias/html_admon.php");
include_once("../librerias/FunGral.php");
class administracion extends conexion { }
<?php
use MyVendor\Connection;
class Admin extends Connection { }
<?php
require '../vendor/autoload.php';
Codeigniter no es el único framework, ni el más nuevo.
Conoce:
<?php
$variable = function () {
// Do something.
}
$app->get('/home', function() use ($variable) {
// Do something.
});
<?php
use MyVendor\Database\Connection;
use Symfony\Component\HttpFoundation\Request;
use RabbitMQ\Connection as RabbitConnection;
<?php
trait shareMethods {
function getReturnType() { /*1*/ }
function getReturnDescription() { /*2*/ }
}
class One {
use shareMethods;
public private function noooooooo()
{
$this->getReturnType();
}
}
class Wawa {
use shareMethods;
public function run()
{
// ...
$this->getReturnDescription();
// ...
}
}
<?php
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
$container->addCompilerPass(new class (
$container->get("annotation_reader"),
$container->get("command_dependency_resolver")) implements CompilerPassInterface {
private $reader;
public function __construct($reader, $resolver)
{
// ...
}
public function process(ContainerBuilder $container)
{
// ...
}
});
<?php
function stringTest(string $string): string {
echo $string;
}
function intTest(int $integer): int {
echo $integer;
}
function floatTest(float $float): float {
echo $float;
}
http://php.net/manual/en/language.types.php
By David Flores
#PHPWay #PHPMexico #PHPTheRightWay Mexico #php