require
PHP
req.php
<?php define('HOGE', 'Hooooooooooge!'); $piyo = 'Hello world!';
main.php
<?php require_once 'req.php'; var_dump(HOGE); # => string(14) "Hooooooooooge!" var_dump($piyo); # => string(12) "Hello world!"
Ruby
req.rb
HOGE = 'Hooooooooooge!' piyo = 'Hello world!'
main.rb
require 'req' p HOGE # => "Hooooooooooge!" p piyo # => undefined local variable or method `piyo' for main:Object (NameError)