blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
116
path
stringlengths
2
241
src_encoding
stringclasses
31 values
length_bytes
int64
14
3.6M
score
float64
2.52
5.13
int_score
int64
3
5
detected_licenses
listlengths
0
41
license_type
stringclasses
2 values
text
stringlengths
14
3.57M
download_success
bool
1 class
1888aa88e00cc706b0316ecfd765b3750cdc0e2a
PHP
ChangLeoplod/default
/include/visit_stats.class.php
UTF-8
14,288
2.65625
3
[]
no_license
<?php if(!defined('SLINEINC')) exit("Request Error!"); class Visit_Stats { var $php_self; var $referrer; var $title; function __construct($referrer, $php_self,$title) { $this->php_self = $php_self; $pos = strpos($this->php_self, '/', 9); $this->php_self = substr($this->php_sel...
true
b00107a88459b82ad8e4ac30453002622277aa37
PHP
SonsOfPHP/money
/Exception/ArithmeticException.php
UTF-8
279
2.65625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace SonsOfPHP\Component\Money\Exception; use Exception; /** * Arithmetic Exception. * * This is thrown when the math is fucked up like dividing by zero * * @author Joshua Estes <joshua@sonsofphp.com> */ class ArithmeticException extends Exception { }
true
1ea19640cf295278008287200aea3208855d71e4
PHP
WilsonLee0714/php
/ab_edit.php
UTF-8
4,456
2.65625
3
[]
no_license
<?php require __DIR__. '/__connect_db.php'; $pname = 'edit'; // 自訂的頁面名稱 if(!isset($_GET['sid'])){ header('Location: ab_list.php'); exit; } $sid = intval($_GET['sid']); if(!empty($_POST['name']) and !empty($_POST['email'])){ try { $sql = "UPDATE `address_book` SET `name`=?, `email`=?, `mobile`=?...
true
c74112b5ebef509b1366296a16aadb676ba99d47
PHP
arsanchez/auctions
/app/Providers/ArrayUserProvider.php
UTF-8
1,479
2.796875
3
[]
no_license
<?php namespace App\Providers; use \Illuminate\Auth\GenericUser; use \Illuminate\Contracts\Auth\UserProvider; use \Illuminate\Contracts\Auth\Authenticatable; use App\user; class ArrayUserProvider implements UserProvider { private $credential_store; public function __construct(array $credentials_array) { ...
true
0219f0291884399eecbead8e851dae1f916b2c09
PHP
kuaukutsu/validator
/src/rules/StrictConditions.php
UTF-8
451
2.828125
3
[]
no_license
<?php declare(strict_types=1); namespace kuaukutsu\validator\rules; trait StrictConditions { /** * @var bool whether the comparison to value is strict. * Defaults to TRUE. */ private bool $strict = true; public function isStrict(): bool { return $this->strict; } public...
true
9b196e83a4ecf56a365d233a968227f4afad0ea6
PHP
Lks9172/php_study
/functions/Configurations/1/index.php
UTF-8
1,153
2.859375
3
[]
no_license
<?php /** * PHP Extension. */ //Loaded // extension 불러오기 반환값은 boolean형 // var_dump(extension_loaded('mbstring')); // load된 익스텐션들을 반환합니다. // var_dump(get_loaded_extensions()); /** * include Path. */ // Set set_include_path(__DIR__ . '/mylib'); include 'mylib/HelloWorld.php'; //-> Hello, world //Get - 경로를 반환합니...
true
a230dda7e20ba808b3fac13fd25a5134e793498d
PHP
adeyura/penjadwalan-upt-bahasa
/Pengajar.php
UTF-8
1,859
3.453125
3
[]
no_license
<?php // include("Kelas.php"); class Pengajar { /* Member variables */ public static $lastPengajarId; public $pengajarId; public $name; public $kelasName; public $start; public $end; public $days = array(0,1,1,1,1,1); public $currentRuang; public $currentStartTime; public $currentDay; public ...
true
36ff091d3239005f13a989c81120f3a3eca8b665
PHP
agilesdesign/repertoire
/src/Repertoire/Models/Scopes/SortedScope.php
UTF-8
742
2.65625
3
[]
no_license
<?php namespace Repertoire\Models\Scopes; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Scope; class SortedScope implements Scope { public function apply(Builder $builder, Model $model) { $sort = $this->parseSortColumn($model); ...
true
af51361157a93e7cd0d964ae378ad5d8f12157fb
PHP
nvv3494/php_demo
/xml.php
UTF-8
354
3.203125
3
[ "MIT" ]
permissive
<?php /* $myXML = "<?xml version = '1.0' encoding = 'UTF-8'?> <student> <name>ABCXYZ</name> <school>Havard</school> </student> "; $xml = simplexml_load_string($myXML); print_r($xml); */ $xml = simplexml_load_file("note.xml") or die("Error: can't create object"); foreach ($xml as $key => $value) { # c...
true
7770530f85846d14200f0bc3fff9d7357616fdb8
PHP
mufc2310/WDL
/php/function.php
UTF-8
1,077
2.6875
3
[]
no_license
<?php $link=null; function connectDB(){ $db_host="localhost"; $db_user ="root"; $db_password = "root"; $db_name = "AIKTC"; global $link; $link = mysqli_connect($db_host,$db_user,$db_password) or die(mysqli_error()); mysqli_select_db($link,$db_name) or die(mysqli_error()); } function queryMysql($qu...
true
cce8c3aaeb0f031ca38fd6c1b8bcee0702f4c7fb
PHP
darkorsa/shop
/example/cart.php
UTF-8
2,715
2.8125
3
[ "MIT" ]
permissive
<?php require_once __DIR__ . '/../vendor/autoload.php'; // Autoload files using Composer autoload use Plane\Shop\Cart; use Plane\Shop\Payment; use Plane\Shop\Product; use Plane\Shop\CartItem; use Plane\Shop\Shipping; use Plane\Shop\CartPresenter; use Plane\Shop\CartItemCollection; use Money\Currencies\ISOCurrencies; ...
true
2de8737afcd3d7d34e85d194e32069c19e1c0077
PHP
akaplya/mage-state-machine
/lib/internal/Magento/Framework/StateMachine/Routine/Config/Data/BaseRoutine.php
UTF-8
526
2.640625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: akaplya * Date: 2/16/19 * Time: 4:05 PM */ namespace Magento\Framework\StateMachine\Routine\Config\Data; /** * Class BaseRoutine * @package Magento\Framework\StateMachine\Routine\Config\Data */ class BaseRoutine { /** * @var string */ private $name; ...
true
58cd6e7115ff2e397e7922e538f072a6947b45f2
PHP
Ryuno-Ki/Wicked-outer-World
/source/lib/account.php
UTF-8
7,922
2.640625
3
[]
no_license
<?php /** * Handles account data entity. * * Hitpoints (fighter hits) * Endurance (chances relative to endurance) * Action points (needed for actions) * * About hitpoints: * + Depends on the fighter model * + Recreation based on nanites * * About endurance: * + Increase amount by quarters ...
true
b913a47c08ab494f8de87d31443ae78e82ea5c9b
PHP
lewisrache/workoutapp
/api_mark_ii/src/Component.php
UTF-8
605
3.4375
3
[]
no_license
<?php declare(strict_types=1); final class Component { private $exercise; private $sets; private function __construct($exercise) { $this->exercise = $exercise; $this->sets = []; } public static function fromExercise(Exercise $exercise): Component { return new self($e...
true
4e30bab90723104209e9c0df9f71cc6808260d9b
PHP
oldmine/currencies-converter
/example.php
UTF-8
549
2.609375
3
[ "MIT" ]
permissive
<?php use oldmine\CurrenciesConverter\DataSources\BinanceApiDataSource; use oldmine\CurrenciesConverter\Graph\GraphBuilder; use oldmine\CurrenciesConverter\Graph\PathFinder; use oldmine\CurrenciesConverter\PriceCalculator; require_once 'vendor/autoload.php'; $dataSource = new BinanceApiDataSource(); $graphBuilder = ...
true
4d340bd510a09e6459f765c97d346d1585df0f0e
PHP
matheeusmarques/mygym
/app/Http/Controllers/Admin/StateController.php
UTF-8
5,086
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Admin; use App\State; use App\City; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Http\Controllers\Controller; use Auth; use Validator; Use Exception; class StateController extends Controller { /** * Display a listing of the resource. * * @retur...
true
25847d7ea0e4a36ff8ea8fcfd157616512cf0306
PHP
kiasn2018/kisancraft.org
/config/db2.php
UTF-8
311
2.75
3
[]
no_license
<?php // date base connection $servername = "localhost"; $username = "login"; $password = "yes"; $dbname = "mayur"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }
true
8e7a0206fcccc158129a3483d08ff875423e33ef
PHP
ARCANEDEV/Currency
/src/Contracts/CurrencyProvider.php
UTF-8
416
2.671875
3
[]
no_license
<?php namespace Arcanedev\Currency\Contracts; interface CurrencyProvider { /* ------------------------------------------------------------------------------------------------ | Main Functions | ------------------------------------------------------------------------------------------------ */ p...
true
522d6d5cff2bec6f6162ab9847fcc95d6a6b3f82
PHP
citysites/ymlparser
/src/TYML.php
UTF-8
2,202
3.046875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace LireinCore\YMLParser; /** * Trait TYML * @package LireinCore\YMLParser */ trait TYML { /** * @param string $name * @param mixed $value * @return $this */ protected function addField($name, $value) { $setter = 'set' . str_replace(['-', '_'], '', $name); ...
true
aa7232df07a1ddba3712b9e0b410ed78a56cc453
PHP
ernesti/programmer-site
/index.php
UTF-8
1,297
2.765625
3
[]
no_license
<? function formatDate( $date ) { $date = explode('-', $date); switch ( $date[1] ) { case 1: $m='января'; break; case 2: $m='февраля'; break; case 3: $m='марта'; break; case 4: $m='апреля'; break; case 5: $m='мая'; break; case 6: $m='июня'; break; case 7: $m='июля'; break; case 8: $m='августа'; bre...
true
df4f9b3f2a36e20852162e31e8f792289572e2c7
PHP
drdplusinfo/hunting-and-fishing
/tests/HuntingAndFishing/CatchProcessingQualityTest.php
UTF-8
2,484
2.890625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace DrdPlus\Tests\HuntingAndFishing; use Granam\DiceRolls\Templates\Rolls\Roll2d6DrdPlus; use DrdPlus\HuntingAndFishing\CatchProcessingQuality; use DrdPlus\HuntingAndFishing\Cooking; use DrdPlus\BaseProperties\Knack; use Granam\TestWithMockery\TestWithMockery; class CatchProcessi...
true
50de036fda356eb0197c768581e3bd97bcacc6c7
PHP
minhducita/jawhm
/mail/@mail.php
UTF-8
4,155
2.546875
3
[]
no_license
#!/usr/bin/php -q <?php function getRandomString($nLengthRequired = 8){ $sCharList = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; mt_srand(); $sRes = ""; for($i = 0; $i < $nLengthRequired; $i++) $sRes .= $sCharList{mt_rand(0, strlen($sCharList) - 1)}; return $sRes; } ...
true
fa29d966624143e46aca6741600acd081d4b271a
PHP
huongbee/php2406
/banco/index.php
UTF-8
830
2.859375
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Bàn cờ</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="banco"> <?...
true
5c46c094a0f5b76d55f60ae268371c58dc044f30
PHP
pradeeptakhatoi/SocialLogins
/src/View/Helper/CustomHelper.php
UTF-8
5,822
2.71875
3
[]
no_license
<?php namespace Cake\View\Helper; use Cake\View\Helper; use Cake\Datasource\ConnectionManager; use Cake\I18n\Time; class CustomHelper extends Helper { function dateDisplay($datetime) { if ($datetime != "" && $datetime != "NULL" && $datetime != "0000-00-00 00:00:00") { return date("M d, Y", s...
true
827d619f7afc719fcc415dd8e85aff487df50dc0
PHP
hudhafaidha/magang
/ci4/app/Models/ScarlettModel.php
UTF-8
443
2.6875
3
[ "MIT" ]
permissive
<?php namespace App\Models; use CodeIgniter\Model; class ScarlettModel extends Model { protected $table = 'scarlett'; protected $useTimestamps = true; protected $allowedfields = ['nama', 'slug', 'manfaat', 'harga', 'sampul']; public function getScarlett($slug = false) { if ($slug ==...
true
c2a7c8983ff26b02747368d5de4795a2cec3036d
PHP
greentracery/RPF
/www/Includes/RPF/View/Index.php
UTF-8
877
2.625
3
[]
no_license
<?php /** * Just another small extendable MVC framework for rapid prototyping of APIs, web-services and web-sites. * Yep, it's again the `reinventing of wheel` 😉 * * @author A.Mikhaylichenko (greentracery@gmail.com) * @url https://github.com/greentracery/RPF/ * @package RPF * @version 0.1b */ /** * Subst...
true
38ff5fa7b0a026dcfd54393443800034fb974dae
PHP
Kingsong/School_Servis
/BProje_PHP/public/index.php
UTF-8
10,945
2.546875
3
[]
no_license
<?php use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; require '../vendor/autoload.php'; require '../includes/DbOperations.php'; $app = new \Slim\App([ 'settings'=>[ 'displayErrorDetails'=>true ] ]); $app->post('/createuser', function(Re...
true
f6dd7aa9ae978ae27c21c3a99bc8fe2eb5a7a4ab
PHP
farhad2019/caristo
/app/Models/UserShowroom.php
UTF-8
2,630
2.59375
3
[]
no_license
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; /** * Class UserShowroom * @package App\Models * * @property integer id * @property integer user_id * @property string name * @property string logo * @property string last_name * @property strin...
true
ac005b99411d595c7ac5581fe1a08c77bc4b97e0
PHP
rfergomes/AdminLTE_MVC
/app/helper/helper.php
UTF-8
3,435
3.015625
3
[ "MIT" ]
permissive
<?php function i($array) { echo "<pre>"; var_dump($array); echo "</pre>"; die(); } function tira_mascara($valor) { return preg_replace("/\D+/", "", $valor); } function objToArray($objeto) { return is_array($objeto) ? $objeto : (array) $objeto; } function validaEmail($email) { $conta = "/...
true
fc88eee318ff8793c5275cb9239d4f6d4caa4d55
PHP
Cole-Campbell/SSP2
/!Week 5/Constant/index.php
UTF-8
488
3.625
4
[]
no_license
<?php define('thisConstant', 'Imps!!!'); echo thisConstant; class MyClass{ const VAT_RATE = 1.23; function __construct(){ echo self::VAT_RATE; } } $myObj = new MyClass(); class AnotherClass{ public static $my_static = '<br/>Crazy Static<br/>'; function __construct(){ echo self::$my_static; } } #Can use...
true
ded3e78414d59fc50172ab09fe6788d8dd5f9f11
PHP
tetris66613/computer-graphics
/Classes/Database.php
UTF-8
15,564
2.765625
3
[]
no_license
<?php abstract class aDatabase { protected $user; protected $pass; protected $host; protected $dbname; protected $dbh; abstract public function dbConnect($host, $dbname); } class MySQL_Database extends aDatabase { protected $usersTable; protected $articlesTable; protected $langTable; ...
true
ba97e56494245c189cc4684a4524c1333e99b567
PHP
patriciadoamaral/api-lumen
/www/app/Repositories/UserRepositoryEloquent.php
UTF-8
709
2.890625
3
[]
no_license
<?php namespace App\Repositories; use App\Models\User; class UserRepositoryEloquent implements UserRepositoryInterface { private $model; public function __construct(User $user) { $this->model = $user; } public function getAll() { return $this->model->all(); } public...
true
67eee9a02583af9b6831afea46f0ebba5bba0f28
PHP
Michael2437/phpspreadsheet
/phpspreadsheet/excel.php
UTF-8
2,404
2.515625
3
[]
no_license
<?php require 'vendor/autoload.php'; include '../funciones.php'; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; $worksheet = IOFactory::load('template.xlsx'); $nuevo = new Funcion(); $con=$nuevo->conectar(); date_default_timezone_set('America/Lima'); $hoy =date('Y-m-d'); $resultad...
true
4093b47493e2e6714fb0b956a1035bae4a56da14
PHP
saiaspire/ClinicSystem-CS2102
/Patient/visitDetails.php
UTF-8
2,734
2.671875
3
[]
no_license
<?php require_once("../Templates/Patients_Template.php"); //session_start(); ?> <title>Past Visits</title> <div id="content"> <a href="visit_list.php"><input type="button" name="cancel" value="Back to Visits"></a><br><br> <?php $row_num_str = $_POST['details']; $row_num = (int) $row_nu...
true
158dbb31111bb5325783b3ff67404ea0b8ee7a45
PHP
eleonorbergqvist/ellie-blogg
/Core/Db.php
UTF-8
1,242
3.125
3
[]
no_license
<?php namespace Core; use \PDO; class Db { private static $instance; private $pdo; protected function __construct($servername, $username, $password, $db) { try { $pdo = new PDO( "mysql:host=$servername;dbname=$db", $username, $pass...
true
4e077f699aecea1699c9913611dd44c9538bf973
PHP
jmeinken/VillageBuilderNG
/src/villagebuilder/app/controllers/ApiParticipant.php
UTF-8
1,706
2.515625
3
[ "MIT" ]
permissive
<?php class ApiParticipant extends BaseController { const STATUS_OK = 200; const STATUS_FORBIDDEN = 403; const STATUS_BAD_REQUEST = 400; const STATUS_NOT_FOUND = 404; const STATUS_INTERNAL_SERVER_ERROR = 500; public function getParticipant() { if (Input::has('participant...
true
8bea3182c70655ff5a3c17b8f2ad9327728fa81c
PHP
crojaspe18dw/ejerciciosphp
/ejerciciosiete.php
UTF-8
374
3.5
4
[]
no_license
<html> <head> <title></title> </head> <body> <?php $numerointroducido=2; $resultado=0; if($numerointroducido>0){ if($numerointroducido%2==0){ $resultado=$numerointroducido/2; echo $resultado; }else $resultado=$numerointroducido*3+1; echo $resultado; } else echo "intr...
true
c2988af3fd97f22336b70c3cb192d4ec2717f740
PHP
x3tech/functional-php
/Tests/IterableTest.php
UTF-8
4,272
2.609375
3
[ "MIT" ]
permissive
<?php namespace x3\Functional\Tests; use \ArrayObject; use x3\Functional\Iterable as I; use x3\Functional\Map; class IterableTest extends \PHPUnit_Framework_TestCase { public function testMultiPad() { $arrayA = [0, 1, 2, 3]; $arrayB = [1, 2, 3]; $this->assertEquals( [[0, ...
true
82f1cd15670c649da6a3730d0857c4aee284d6f2
PHP
Subscribo/Subscribo
/vendor/subscribo/transaction-plugin-manager/src/Subscribo/TransactionPluginManager/Facades/LocalizerFacade.php
UTF-8
1,047
2.609375
3
[ "MIT" ]
permissive
<?php namespace Subscribo\TransactionPluginManager\Facades; use Subscribo\TransactionPluginManager\Interfaces\LocalizerFacadeInterface; use Subscribo\TransactionPluginManager\Traits\TransparentFacadeTrait; use Subscribo\Localization\Interfaces\LocalizerInterface; /** * Class LocalizerFacade * * @package Subscribo...
true
5b873435d74ec3ea1f0f53d1683cb50c7949a0e6
PHP
railroadmedia/railcontent
/src/Repositories/PermissionRepository.php
UTF-8
909
2.578125
3
[]
no_license
<?php namespace Railroad\Railcontent\Repositories; use Illuminate\Database\Query\Builder; use Railroad\Railcontent\Repositories\Traits\ByContentIdTrait; use Railroad\Railcontent\Services\ConfigService; class PermissionRepository extends RepositoryBase { use ByContentIdTrait; /** * This tells the query ...
true
09809357877ad5ed8759b855f4b9ac25ea26db6d
PHP
virendranamdev/haier
/Class_Library/class_user_update.php
UTF-8
10,393
2.546875
3
[]
no_license
<?php session_start(); require_once('class_connect_db_Communication.php'); class User { public $DB; public function __construct() { $db = new Connection_Communication(); $this->DB = $db->getConnection_Communication(); } public $filename; public $filetempname; public $fullcsvpath; function upload...
true
e961b32f235c7687db13007bf452a44f92aa8c87
PHP
thisisryian/satuh
/src/pulsa.php
UTF-8
3,162
2.859375
3
[ "MIT" ]
permissive
<?php namespace satuh; use InvalidArgumentException; class pulsa { const URL = "https://epay.satuh.com/api/pulsa"; protected $accessToken = null; protected $clientId; protected $clientSecret; protected $httpBuilder; protected $ENVIRONMENT; protected $defaultHeaders = array( 'Authoriz...
true
38448193dd83dec438eeb3e2449f9b56fa83ba9f
PHP
z-yuchen97/Movie-Rating-Website
/Movie website/comment/comment_database.php
UTF-8
2,311
2.5625
3
[ "MIT" ]
permissive
<?php ini_set("session.cookie_httponly", 1); session_start(); $previous_ua = @$_SESSION['useragent']; $current_ua = $_SERVER['HTTP_USER_AGENT']; if(isset($_SESSION['useragent']) && $previous_ua !== $current_ua){ die("Session hijack detected"); }else{ $_SESSION['useragent']...
true
06d8e109c670b4376bec18111b25f89578ce403d
PHP
jacksonfraga/CineSenac
/domain/clientePersistencia.php
UTF-8
3,215
2.859375
3
[]
no_license
<?php include_once 'mysql.php'; include_once 'class.cliente.php'; /** * Description of clientePersistencia * * @author Jackson */ class ClientePersistencia { private function fetchEntity($record) { $cliente = new Cliente(); $cliente->setId($record->Id); $cliente->setNome($record->Nom...
true
c0fd1da9ada07a9d63571fe15b4c67dcccfdb156
PHP
RiC-Jun/BeeJee-test
/App/Controllers/Index.php
UTF-8
2,306
2.609375
3
[]
no_license
<?php namespace App\Controllers; use App\Models\Task; use App\Models\User; use App\Paginator; class Index extends ControllerViewableAbstract { protected $dbConditions = []; protected $pagination; public function __construct() { parent::__construct(); $this->pagination = new Paginato...
true
5b17f709e875674914ea8efc89f862fe7f43c187
PHP
nic-chen/mrzhxs
/admin/article/index.php
UTF-8
1,928
2.515625
3
[]
no_license
<?php include_once("settings.php"); include_once(LIBPATH."lib.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" href="../style.css" type="text/css" media="screen"/> ...
true
2b9f7fa2d14450f681745e54b7337c1cdb9b4159
PHP
Rupa1995/php_task
/task6_result.php
UTF-8
5,675
2.765625
3
[]
no_license
<?php session_start(); ?> <?php //----------------------- image insertion ----------------------- if(isset($_FILES['image'])){ $errors= array(); $file_name = $_FILES['image']['name']; $file_tmp =$_FILES['image']['tmp_name']; /*$file_type=$_FILES['image']['type']; $tmp = explode('.',$_FILE...
true
03e164530706226e697b179d6958b3038d5134c2
PHP
matry-ny/contact-mvc
/components/Router.php
UTF-8
3,025
2.96875
3
[]
no_license
<?php namespace components; /** * Class Router * @package components */ final class Router { /** * @var Dispatcher */ private $dispatcher; /** * Router constructor. * @param Dispatcher $dispatcher */ public function __construct(Dispatcher $dispatcher) { $this->...
true
3f97b87c7ec2d2bd0b2a1088f4dc2dbb916a3426
PHP
dmreinoso/romanosTdd
/roman.php
UTF-8
1,953
3.6875
4
[]
no_license
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Description of roman * * @author Diego */ class roman { public function convertDigit($arabicNumbe...
true
3eff4ff76fb441571cf8dbf2a3e06fc8cb4ab9ee
PHP
DesenvolvedorPHP/PHP-Basics
/Padrão Procedural/04_retorno.php
UTF-8
931
4
4
[ "MIT" ]
permissive
<?php /* Valores podem ser retornados utilizando a instrução opcional return. Qualquer tipo pode ser retornado, incluindo arrays e objetos. Isto faz com que as função termine sua execução imediatamente e passa o controle de volta para a linha de onde ela foi chamada. */ /* function abc(){ return "123"; } $va...
true
b799fede5b1691f9c87930d438b3aa69f3307ad9
PHP
nginxinc/NGINX-Demos
/fun-with-health-checks/unitcpu/content/httpget.inc
UTF-8
1,380
2.921875
3
[ "Apache-2.0" ]
permissive
<?php /****************************************************************************** * httpGet ******************************************************************************/ function httpGet($url) { $responseCode = 0; $responseData = ''; $error = ''; $ch = curl_init(); try { curl_seto...
true
0e2c22aa354c594eb27798cbcf356c03d4a57c2f
PHP
yuichiis/Aneris
/library/Aneris/Mvc/Plugin/Url.php
UTF-8
1,434
2.53125
3
[]
no_license
<?php namespace Aneris\Mvc\Plugin; use Aneris\Mvc\Exception; class Url { protected $context; public static function factory($pluginManager) { return new self($pluginManager); } public function __construct($pluginManager) { $this->context = $pluginManager->get('Context'); ...
true
ef9880918c2565fb74557fb0d5de19e3f402fa47
PHP
Somu2017/SomuFinanceAJAX
/bill/index.php
UTF-8
2,711
2.578125
3
[]
no_license
<?php session_id("newBill"); session_start(); function dbQuery($query) { $dbc = mysqli_connect('localhost','root','atlantis2016','itemDB') or die("Error Connecting to Database"); $result = mysqli_query($dbc,$query) or die("Error Querying Database for $query"); return $result; } if(!empty($_POST...
true
67d2592c7019462578d8a3982201b260e0fdfa02
PHP
hwalde/pooq
/src/CodeGeneration/NamespaceObject.php
UTF-8
887
2.8125
3
[ "BSD-3-Clause" ]
permissive
<?php declare(strict_types=1); /** * This file is part of POOQ. * * (c) Herbert Walde <herbert.walde@gmail.com> * * For the full copyright and license information, read the LICENSE file that was distributed with this source code. */ namespace POOQ\CodeGeneration; class NamespaceObject { /** @var string */ ...
true
070cb21254bc161b6cc29161649aa7085df68f1b
PHP
Baptouuuu/Game
/fight.php
UTF-8
360
2.65625
3
[]
no_license
<?php declare(strict_types = 1); require 'vendor/autoload.php'; $match = new \Game\Match\RandomMatch( new \Game\Match\DeathMatch, new \Game\Match\Duel ); $result = $match->run(); echo 'type => '; dump($match->type()); echo 'winner => '.$result->winner()."\n"; dump($result->winner()); echo 'loser => '.$result...
true
d619f720179195122b6c72a752a7190755f863aa
PHP
gethub102/php
/sandbox/cookie/sessioins.php
UTF-8
295
3.09375
3
[]
no_license
<?php session_start(); ?> <!DOCTYPE html> <html lan="en"> <head> <title>Sessions</title> </head> <body> <?php $_SESSION['first_name'] = "Kevin"; $name = $_SESSION['first_name']; echo $name; // in the same request-response cycle, session file opened and retrived. ?> </body> </html>
true
52746be5d4065084c9d5b3b9abb18e42196da966
PHP
CeusMedia/HydrogenFramework
/tool/Migration/Applier.php
UTF-8
3,168
2.609375
3
[]
no_license
<?php class Tool_Migration_Applier { protected $modifiers = array(); protected $folder; public function apply(): object { if( !$this->modifiers ) throw new RangeException( 'No modifiers set' ); return $this->handleFolder( $this->folder ); } public function setModifiers( array $modifiers ): self { $th...
true
1e1832463a62597206bee5bf6d065bcafd434288
PHP
asterion-cms/asterion
/site/app/lib/base/FormField/FormField_File.php
UTF-8
9,126
2.84375
3
[]
no_license
<?php /** * @class FormFieldFile * * This is a helper class to generate a file form field. * * @author Leano Martinet <info@asterion-cms.com> * @package Asterion * @version 4.0.0 */ class FormField_File { /** * The constructor of the object. */ public function __construct($options) { ...
true
940a6a7ba6ea43e0341ad5d19b90b228740bdd3f
PHP
spescina/platform-core
/src/Spescina/PlatformCore/components/breadcrumbs/Breadcrumbs.php
UTF-8
930
2.53125
3
[]
no_license
<?php namespace Spescina\PlatformCore\Components\Breadcrumbs; use Spescina\PlatformCore\Facades\Platform; use Spescina\PlatformCore\Components\Breadcrumbs\Item; use Spescina\PlatformCore\Interfaces\Displayable; class Breadcrumbs implements Displayable { use \Spescina\PlatformCore\Traits\Displayable; ...
true
d25f339cfbe8d9b6dbd44ced926d97f84c31cdb2
PHP
holloway87/hw-basics-bundle
/Menu/MenuFactory.php
UTF-8
2,070
2.875
3
[ "WTFPL" ]
permissive
<?php /* * Copyright © 2014 Thomas Rudolph <me@holloway-web.de> * This work is free. You can redistribute it and/or modify it under the * terms of the Do What The Fuck You Want To Public License, Version 2, * as published by Sam Hocevar. See the LICENSE file for more details. */ namespace Hw\BasicsBundle\Menu; u...
true
b41e98cf0f069baa3cc899e8ebcc228af2f73544
PHP
Dmitriy-Bazhan/clear-php
/models/query/Query.php
UTF-8
4,707
2.859375
3
[]
no_license
<?php namespace models\query; use models\BaseModel; class Query extends BaseModel { public function getLastTenThousandsUserId() { $query = "SELECT id FROM users ORDER BY id DESC LIMIT 10000"; $result = $this->myQuery($query); return array_reverse($result->fetchAll(\PDO::FETCH_ASSOC));...
true
e95f2286410b6a861d0ba87c8104abcffec2f161
PHP
btarditi/blog_alaska
/lib/vendors/Form/FormBuilder/EpisodeFormBuilder.php
UTF-8
1,532
2.875
3
[]
no_license
<?php namespace Form\FormBuilder; use \Form\Field\StringField; use \Form\Field\TextField; use \Form\Validator\MaxLengthValidator; use \Form\Validator\NotNullValidator; /** * Class EpisodeFormBuilder * Constructeur du formulaire Episode */ class EpisodeFormBuilder extends FormBuilder { public function build() ...
true
2ea773b2f9f97d24021144fa751aceadd3b7e4e1
PHP
tbruckmaier/corcel-acf
/src/Models/Traits/SerializedSometimes.php
UTF-8
693
2.640625
3
[ "MIT" ]
permissive
<?php namespace Tbruckmaier\Corcelacf\Models\Traits; /** * For fields which are sometimes serialized */ trait SerializedSometimes { /** * Whether the internal value is serialized. * * @return bool */ abstract public function getIsSerializedAttribute() : bool; /** * If multiple ...
true
3d1fd0b2e4ac181cb9ecd87e16159a5e1e497467
PHP
luoxianjie/blog
/lxj/Admin/Controller/BlogController.class.php
UTF-8
1,789
2.625
3
[]
no_license
<?php namespace Admin\Controller; use Admin\Model\CategoryModel; class BlogController extends CommonController{ /** * 增加文章 */ public function addBlog(){ if(IS_POST){ $blog=D('blogs'); $data=I('post.'); $data['time']=time(); $data['attr']=implode(',', $data['attr']); if($blog->add($data)){ ...
true
75403654ea41824ed7183e8d237b43e7a46dafe8
PHP
SerkanYildiz/phpunit-to-cobertura
/src/Cobertura/CoberturaPackage.php
UTF-8
2,423
2.890625
3
[ "MIT", "LicenseRef-scancode-other-permissive" ]
permissive
<?php namespace Soyhuce\PhpunitToCobertura\Cobertura; use Soyhuce\PhpunitToCobertura\Support\Utils; class CoberturaPackage { /** @var string */ private $name; /** @var array<\Soyhuce\PhpunitToCobertura\Cobertura\CoberturaClass> */ private $classes; public function __construct(string $name) ...
true
e0e6f05127503d80e5a7c92e9b6a651efbb078e9
PHP
itsjustanthony/laravel-dawn
/src/itsjustanthony/Laravel/Dawn/Console/DawnCommand.php
UTF-8
2,812
2.578125
3
[]
no_license
<?php namespace itsjustanthony\Laravel\Dawn\Console; use Illuminate\Console\Command; use Illuminate\Support\Facades\Storage; use Laravel\Dusk\Console\DuskCommand; class DawnCommand extends DuskCommand { /** * The name and signature of the console command. * * @var string */ protected $si...
true
27eb48a5dac7dec871ad59b86019c6ff7a16f180
PHP
credi2/plugins-magento-1
/src/app/code/community/LimeSoda/Cashpresso/Model/Payment/Method/Cashpresso.php
UTF-8
1,500
2.53125
3
[]
no_license
<?php /** * Cash on delivery payment method model */ class LimeSoda_Cashpresso_Model_Payment_Method_Cashpresso extends Mage_Payment_Model_Method_Abstract { protected $_canUseInternal = false; protected $_isInitializeNeeded = true; protected $_canCancelInvoice = true; public function canEdit() ...
true
d02e65895ba33a96cc7687df8bc98882789c8e71
PHP
ArjunAranetaCodes/MoreCodes-PHP
/Arrays/problem19.php
UTF-8
157
3.375
3
[]
no_license
<?php $array1 = array(1,2,3); $array2 = array(1,2,3); $array2 = array_merge($array1, $array2); foreach($array2 as $num){ echo $num."<br/>"; } ?>
true
d0b37c169818e2d8decf382cff6e95234be5cfcf
PHP
Gigabait/NovaGram
/src/Telegram/ObjectsList.php
UTF-8
1,633
3.015625
3
[ "MIT" ]
permissive
<?php namespace skrtdev\Telegram; use skrtdev\NovaGram\Exception; use skrtdev\Prototypes\proto; use ArrayAccess, Iterator; class ObjectsList implements Iterator, ArrayAccess { use proto; private int $position = 0; private array $elements; public function __construct(array $elements) { $th...
true
ee0d81066e1947a5bc6cd8e02b3476561e1a6570
PHP
ObvTella/MegaCar
/Website/MegaCar/app/Http/Controllers/MacchineController.php
UTF-8
2,919
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Models\Macchina; use Illuminate\Http\Request; class MacchineController extends Controller { /** @var macchina */ protected $macchina; /** /** * Create a new controller instance. * @return void */ public function __construct(Macchina $macchina) //constructor { ...
true
0d3b74674d5b315aa7889235816017384448880e
PHP
arseniomuanda/ecommerce
/app/Database/Seeds/Item.php
UTF-8
813
2.703125
3
[ "MIT" ]
permissive
<?php namespace App\Database\Seeds; use CodeIgniter\CLI\CLI; use CodeIgniter\Database\Seeder; use Faker\Factory; class Item extends Seeder { public function run() { $faker = Factory::create(); $total = 30; for ($i=0; $i < $total; $i++) { $data = [ 'setting_...
true
7790a0c3489cdbc0c33402a9d8f943f291e355c1
PHP
tvs-laravel-pkgs/helper-pkg
/src/traits/PermissionTrait.php
UTF-8
983
2.6875
3
[]
no_license
<?php namespace Abs\HelperPkg\Traits; trait PermissionTrait { public static function createFromArrays($permissions) { foreach ($permissions as $permission_id => $data) { if (isset($data['operation']) && $data['operation'] == 'delete') { $permission = self::where([ 'name' => $data['name'], ])->first(...
true
8054d2dcdcaa82dc3ef8b36f7a28d6c0b7828b8b
PHP
santopsycode/krs-khs
/pwd/on-dosen/inputNilai.php
UTF-8
1,350
2.671875
3
[]
no_license
<?php include 'database.php'; $db = new database(); session_start(); /** * Jika Tidak login atau sudah login tapi bukan sebagai admin * maka akan dibawa kembali kehalaman login atau menuju halaman yang seharusnya. */ if ( !isset($_SESSION['user_login']) || ( isset($_SESSION['user_login']) && $_SESSIO...
true
369a43c3513286325550f8067f03c546a239f179
PHP
KentCharles/SedaHotel_MinorProject_ASD
/check.php
UTF-8
1,055
2.515625
3
[ "MIT" ]
permissive
<?php include ('config.php'); $roomType = $_POST['type']; $checkIn = $_POST['check_in']; $checkOut = $_POST['check_out']; if(strcmp($roomType, "DELUXE")==0){ $available =5; $check = "select DISTINCT room_num from availability where check_in <= '$checkIn' and check_out >= '$checkOut' and id =1"; $users=mysqli_...
true
c24b53d231aa930381dc55fd4d27a870ba857b57
PHP
esteban9212/SMC
/app/Http/Controllers/OutcomesController.php
UTF-8
5,611
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Outcome; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Response; class OutcomesController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response ...
true
901b37d8aecc89d48e7e82ea1b2fd43685ab2bd3
PHP
Dudeugotme/Project
/PHP-Project+Database/Proj/search_mgr.php
UTF-8
2,031
2.515625
3
[]
no_license
<?php require_once('db.php'); include("head.php"); include("auth.php"); $found = 0; if(isset($_POST['filter'])){ $col=$_POST['filter']; $sql = "select * from Manager where(Manager.{$col} like '%{$_POST['txt']}%')"; $res = mysql_query($sql); if(mysql_num_rows($res)>0){ $found=1; }else{ $found...
true
9253a89dd25eb1a18c9cb57714e7d2297bdec48b
PHP
ynwa-art/rpc-client
/src/Request/RpcRequestInterface.php
UTF-8
477
2.640625
3
[]
no_license
<?php namespace Moriony\RpcClient\Request; /** * Interface RpcRequestInterface */ interface RpcRequestInterface { /** * @return string */ public function getMethod(); /** * @return array */ public function getParams(); /** * @return string */ public function g...
true
2c69e5f56e5db6745c26d0acf9a42440ca326099
PHP
marcofarnezi/interator
/app/Contracts/HttpClientInterface.php
UTF-8
202
2.703125
3
[ "MIT" ]
permissive
<?php namespace App\Contracts; interface HttpClientInterface { public function add($url); public function loadClient($baseUrl); public function exec(); public function getResult(); }
true
c0730e22c1f275e674fea09425818a77397dd7a6
PHP
Murguero/Consolide
/challenge1.php
UTF-8
889
4.15625
4
[]
no_license
<?php /* Implement AInterface and get A to echo "8". Rules: 1. No Exceptions or PHP errors / warnings notices allowed 2. No redefining $x and $y Hints: 1. Magic methods */ class A { public function __construct(AInterface $answer) { echo "What is 3 + 10 / 2 ?\n"; $answer = $answer->get()->th...
true
7b66c5a3163023ed54f09d3df57bca598bfa6579
PHP
nicoto/CE-2416-FALL-2014
/class-6/pdo/error.php
UTF-8
208
2.6875
3
[]
no_license
<?php require_once "db.php"; try { //connect as appropriate as above $db->query('hi'); //invalid query! } catch(PDOException $ex) { echo "An Error occured! ERROR: <P>" . $ex->getMessage(); } ?>
true
79a76e776b9622ada8752b2e687b67f0af459630
PHP
julian-patmos/horizonte-verde
/models/conn.php
UTF-8
750
3.046875
3
[]
no_license
<?php require_once "config.php"; class Conexion { protected $_db; public function __construct() { $this->_db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); if ( $this->_db->connect_errno ) { echo "Fallo al conectar a MySQL: ". $this->_db->connect_error; ...
true
fe6015cc58af7510654d8da3e724d8d70f5040a6
PHP
MarianaAndujar/FinalReunion
/export.php
UTF-8
15,050
2.625
3
[]
no_license
<?php session_start(); require_once(dirname(__FILE__) . '/config.inc.php'); require_once(MODEL_DIR . '/MMeeting.class.php'); require_once(MODEL_DIR . '/MMembers.class.php'); if(isset($_SESSION['USER_ID'])) $uid = $_SESSION['USER_ID']; else die("403"); if(isset($_GET['id'])){ $meeting_id = intval($_G...
true
38a1f8d7e661a049caa4e700935d8e5460e4aacc
PHP
biliboobrian/microservice-core
/src/Helpers/MicroServiceHelper.php
UTF-8
2,941
3.078125
3
[ "Apache-2.0" ]
permissive
<?php /** * @file * Contains \biliboobrian\MicroServiceCore\Helpers. */ namespace biliboobrian\MicroServiceCore\Helpers; use Exception; use biliboobrian\MicroServiceCore\Enum\Status; use stdClass; /** * A helper class to provide useful functionality common to all microservices. * * @package biliboobrian\MicroS...
true
21beeba4d676b96503ca0fa4c4fd7a1d66fa5863
PHP
maciejkosiarski/xml-finder
/tests/XmlFinderTest.php
UTF-8
1,255
2.65625
3
[]
no_license
<?php use PHPUnit\Framework\TestCase; use MaciejKosiarski\XmlFinder\Exception\InvalidXmlFileException; use MaciejKosiarski\XmlFinder\Exception\InvalidXmlStringException; use MaciejKosiarski\XmlFinder\XmlFinder; /** * Class XmlFinderTest * @author Maciej Kosiarski <mks@moleo.pl> */ class XmlFinderTest extends TestC...
true
b1e367c9cbf4a6f95a26e3ea8be0160f8b555b55
PHP
winw/phpirpg
/irc/modules/ModLevel.php
UTF-8
2,851
2.5625
3
[]
no_license
<?php class ModLevel extends Module { const CHECK_LEVEL = 5; // Check level every X seconds const BASE_TIME = 60; public function onLoad(){ $oTimer = new Timer(self::CHECK_LEVEL, 0, function() { $this->doCheckLevels(); }); TimerManager::add(__CLASS__.'checkLevels', $oTimer); } private func...
true
2d0943fc83a91b3cf3d20009208a0e741b695f04
PHP
nikolaybratoev/PHP-OOP-Basics
/php-oop/polymorphism-interfaces/hardware/TouchScreen.php
UTF-8
170
2.84375
3
[ "MIT" ]
permissive
<?php interface TouchScreen { public function moveFinger(): void ; public function clickFinger(): void ; public function writeText(): string ; }
true
71a6dcbfa0bfbb83002f348560b21cdb4936582d
PHP
ronaldo98-c/Medecine
/app/Helpers/helpers.php
UTF-8
7,932
2.546875
3
[ "MIT" ]
permissive
<?php header('Access-Control-Allow-Origin: *'); use App\Model\A_Allergique; use App\Model\A_Chirugicau; use App\Model\A_Familiau; use App\Model\A_Gynecologique; use App\Model\A_Imunologique; use App\Model\A_Medicamenteu; use App\Model\A_Medicau; use App\Model\A_Obstetricau; use App\Model\A_Vaccinau; use App\Model\Mode_...
true
a7393bcc0cf05b23b773f16da078dcac2c786850
PHP
nam-duc-tong/quanlisinhvien_ajax_php
/qlsv/database.php
UTF-8
837
2.90625
3
[]
no_license
<?php const HOST = 'localhost'; const USERNAME = 'root'; const PASSWORD = ''; const DATABASE = 'banhang'; function execute($sql){ //connection to database $conn = new mysqli(HOST,USERNAME,PASSWORD,DATABASE); mysqli_set_charset($conn,'utf8'); //query mysqli_...
true
00f88c2a3e814cf4437e6ba4feb22368bcdccb0a
PHP
rsrobinett/cs290-invoice-creator
/auth.php
UTF-8
3,754
2.703125
3
[]
no_license
<?php error_reporting(E_ALL); ini_set("display_errors", 1); session_start(); require_once 'src/dbOperations.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { if(isset($_POST['action'])){ $action = $_POST['action']; } if(isset($_POST['username'])){ $username = $_POST['username']; } e...
true
ee717ebfa0b7ce6fb74bde34889bbc2908d82e9e
PHP
epfremmer/test-everything
/src/Handler/Package/DeserializePackage.php
UTF-8
839
2.59375
3
[ "MIT" ]
permissive
<?php /** * Created by IntelliJ IDEA. * User: epfremme * Date: 12/14/15 * Time: 7:54 PM */ namespace Epfremme\Everything\Handler\Package; use Epfremme\Everything\Entity\Package; use JMS\Serializer\SerializerInterface; use Psr\Http\Message\ResponseInterface; class DeserializePackage { /** * @var Seriali...
true
995cbb09b1c77b1e437fc8c23308499cf85baa97
PHP
noah-franklin/smart-library
/f20-Dynamic-Mapping/Admin/Shelf Locations/shelfAdd.php
UTF-8
850
2.671875
3
[]
no_license
<?php include ("../connect.php"); // if submit button is pressed, process inputs if (isset($_POST['submit'])) { // store inputs in variables $ShelfNo = $conn->real_escape_string($_POST['ShelfNo']); $X = $conn->real_escape_string($_POST['X']); $Y = $conn->real_escape_string($_POST['Y']); $Width = $conn->r...
true
ce86840bdfc6316947d967a74f702280b5d55480
PHP
iTzDyms/PiscinePHP
/d06/ex00/Color.class.php
UTF-8
1,751
3.59375
4
[]
no_license
<?PHP Class Color { public static $verbose = FALSE; public $red = 0; public $green = 0; public $blue = 0; public static function doc() { print (file_get_contents("./Color.doc.txt")); return; } public function __construct( array $kwargs ) { if ( array_key_exists( 'red', $kwargs ) ) $this->red = $kwar...
true
febdd9ceb5487a5a63e5362788b22f479e1b2f1f
PHP
stream-org/stream
/OLD/textingLayer/textingLayer.php
UTF-8
3,735
2.765625
3
[]
no_license
<?php include "connection.php"; //extracting data from the XML object $rawMessage = (string) file_get_contents('php://input'); $simpleXML = simplexml_load_string($rawMessage); $picture = (string)$simpleXML->images->image; $phone = (string)$simpleXML->msisdn; $message = (string)$simpleXML->message; //putting the me...
true
6ae680f00b82210874ecf9fb22ee6bdfa2164b1d
PHP
IrynaVlasiuk/FormUserRegistration
/server/classes/App.php
UTF-8
640
2.984375
3
[]
no_license
<?php class App { private static $locale; public static function getLocale() { self::$locale = 'en'; // default value if(isset($_SESSION['lang'])) { self::$locale = $_SESSION['lang']; } if(isset($_GET['lang'])) { self::$locale = $_GET['lang']; s...
true
9e95590ff27e61c9e4b4c9c0af666d3c531bb9aa
PHP
splittingred/FormIt
/core/components/formit/model/formit/module/ficountryoptions.class.php
UTF-8
5,525
2.53125
3
[]
no_license
<?php /** * FormIt * * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com> * * FormIt is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) any * late...
true
4811c718d2db9aa66e9c96513701b72fad019261
PHP
sphinx101/cteles
/app/Models/Grado.php
UTF-8
674
2.515625
3
[ "MIT" ]
permissive
<?php namespace cteles\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Grado extends Model { public $table = "grados"; use SoftDeletes; protected $dates = ['deleted_at']; public $fillable = ["nom_grado" ]; protected $hidden = ['created_at','...
true
2b1198b897d37ca03704922147f8d7b11b8c08ea
PHP
erildobarone/PHP-Basic
/date e setlocale/exemplo-45.php
UTF-8
214
3.125
3
[]
no_license
<?php echo date("d/m/Y h:i:s", 1533214657), "<br>", time(); // se você pegar o valor obtido com time() e adicionar na função date por parametro ("d/m/Y h:i:s", 1533214657) dessa forma, ele fixa a data. ?>
true
1c38e5d2399b4add57f83714d87a2f483cdd2c4f
PHP
LauraSalin/practicahosting
/funcdb.php
UTF-8
1,652
2.671875
3
[]
no_license
<?php class MySQLDataSource { private $conexion; private $querys; private $dev; function conectar() { if(!$this->conexion) { $dbhost = getenv("OPENSHIFT_MYSQL_DB_HOST"); $dbuser = getenv("OPENSHIFT_MYSQL_DB_USERNAME"); $dbpassword = getenv("OPENSHIFT_MYSQL_DB_PASSWORD"); $dbname = ...
true
56b909baea7bbde0d1d137ba419068d16c6ca47f
PHP
kazdopnet/trans1t
/form.php
UTF-8
1,694
2.734375
3
[]
no_license
<?php $driver = 'mysql'; $charset = 'utf8'; $options = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]; $host = 'localhost'; $user = 'trans1t'; $db_name = 'trans1t'; $pass = 'fepipe76!!QQ'; try{ $pdo = new PDO("$driver:host=$host;dbname=$db_name;charset=$charset", $user, $pass, $options); }catch(PDOException $e){ echo...
true
acdf536cebc21c63cf50a38ac280b8d33f5965c5
PHP
jschreuder/SpotCms
/src/ImageEditor/Controller/OperationsTrait.php
UTF-8
1,252
2.5625
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace Spot\ImageEditor\Controller; use Psr\Http\Message\ServerRequestInterface; use Spot\Application\FilterService; use Spot\Application\ValidationService; use Spot\FileManager\FileManagerHelper; trait OperationsTrait { private FileManagerHelper $helper; /** @var Operati...
true