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
7934343d96f97967578f1c0664ac0756880c03fb
PHP
PratikumWebDasar4101/tamimodul6-irfanfazri16
/db2/register.php
UTF-8
1,877
2.859375
3
[]
no_license
<?php require_once("config.php"); if(isset($_POST['register'])){ $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING); $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING); $password = password_hash($_POST["password"], PASSWORD_DEFAULT); $email = filt...
true
d1133eb02f7bafdce4f8d1a87d06ac2f270507fa
PHP
ytteroy/airtel.airshop
/application/modules/cwservers/models/cwservers_model.php
UTF-8
4,386
2.609375
3
[]
no_license
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Cwservers_model extends CI_Model { /** * Main variables */ public $table_structure = array(); public $sql_services_table = NULL; /** * Class constructor */ public function _...
true
5167ae1bf1169e578e379c92bdb9ccd368504ca8
PHP
nwebcode/framework
/src/Nweb/Framework/Application/Service/Locator.php
UTF-8
1,321
2.546875
3
[]
no_license
<?php /** * Nweb Framework * * @category NwebFramework * @package Application * @subpackage Service * @author Krzysztof Kardasz <krzysztof@kardasz.eu> * @copyright Copyright (c) 2013 Krzysztof Kardasz * @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public * @version ...
true
c64bc66afa4af038a33afb8dd43ced6cff735d39
PHP
Raza448/thoughtbase
/application/view_latest/vendor_only/allres_comment.php
UTF-8
912
2.53125
3
[]
no_license
<?php $sql ='select client_answes.id as kid,client_answes.comment,client_answes.client_id,client_answes.survey_id,client_answes.question_id, users.age,users.gender,users.zipcode from client_answes left join users on client_answes.client_id = users.id where client_answes.survey_id='.$survey.' and client_answes.que...
true
94aa2264fb2d4fbcf81c4eaed146b2016763f17b
PHP
id0612/openapi-sdk-php
/src/Cms/V20180308/GetMonitoringTemplate.php
UTF-8
1,435
2.65625
3
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace AlibabaCloud\Cms\V20180308; use AlibabaCloud\Client\Request\RpcRequest; /** * Request of GetMonitoringTemplate * * @method string getName() * @method string getId() */ class GetMonitoringTemplate extends RpcRequest { /** * @var string */ public $product = 'Cms'; /** ...
true
4fc011f0184c787bbdac7410df64c1e396470eb7
PHP
kernvalley/needs-api
/roles/index.php
UTF-8
679
2.59375
3
[ "MIT" ]
permissive
<?php namespace Roles; use \shgysk8zer0\PHPAPI\{PDO, API, Headers, HTTPException}; use \shgysk8zer0\PHPAPI\Abstracts\{HTTPStatusCodes as HTTP}; use \shgysk8zer0\{Role}; require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'autoloader.php'; try { $api = new API('*'); $api->on('GET', function(API $req): void { ...
true
1ea0afcddce9ffde9274b324d172296f4a719f62
PHP
DeDoOozZz/brighterycms
/source/brightery/core/Style.php
UTF-8
2,113
2.703125
3
[]
no_license
<?php /** * Management application styles and interfaces * @package Brightery CMS * @version 1.0 * @property object $instance Codeigniter instance * @property string $interface User Interface name * @property string $styleName Style name * @property string $styleAssets Style assets path * @property string $sty...
true
506a18bd0dd3aa08eac41a157877680f69cfaa83
PHP
didembilgihan/Bookmark-Management-System
/register.php
UTF-8
679
2.734375
3
[ "MIT" ]
permissive
<?php if ( $_SERVER["REQUEST_METHOD"] == "POST") { // var_dump($_POST) ; require "db.php" ; extract($_POST) ; try { // Validate email, name and password $sql = "insert into user ( name, email, password) values (?,?,?)" ; $stmt = $db->prepare($sql); $hash_pa...
true
24fac03e9a4d620c1c8575f84ec56252fc424fc1
PHP
jwmcpeak/TutsPlus-PHP-Design-Patterns
/chain-of-responsibility.php
UTF-8
1,907
3.5625
4
[]
no_license
<?php // chain of handlers // request abstract class LogType { const Information = 0; const Debug = 1; const Error = 2; } abstract class AbstractLog { protected $level; private $nextLogger = null; public function setNext(AbstractLog $logger) { $this->nextLogger = $logger; } ...
true
cc0de231c8619e429820f088d5833fd27b91758c
PHP
gungungggun/workspace
/collatz-problem/php.php
UTF-8
391
3.65625
4
[]
no_license
<?php $t = microtime(true); $count = 0; for ($i = 2; $i <= 10000; $i++) { $x = $i; while ($x != 1) { if ($x % 2 == 0) { $x = a($x); } else { $x = b($x); } $count++; } } echo '処理時間' . (microtime(true) - $t); echo "\n"; echo 'count:' . $count; function a ($n) { re...
true
92803af814f4d592e219db466a90c528d1ae06af
PHP
aliliin/thinkPhp51
/extend/ObjArray.php
UTF-8
905
3.453125
3
[ "Apache-2.0" ]
permissive
<?php // ArrayAccess(数组式访问)接口 // 提供像访问数组一样访问对象的能力的接口。 class ObjArray implements \ArrayAccess { private $container = ['title' => 'Aliliin']; // 设置一个偏移位置的值 public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $...
true
542288972f173c2f99f6a4ea0a15c1cf85f82e56
PHP
crow1796/rev-cms
/RevCMS/src/Http/Controllers/PagesController.php
UTF-8
2,220
2.703125
3
[ "MIT" ]
permissive
<?php namespace RevCMS\Http\Controllers; use Illuminate\Http\Request; use RevCMS\Http\Controllers\RevBaseController; use RevCMS\Modules\Cms\Wrapper\Page; class PagesController extends RevBaseController { public function index(){ $this->menuOrder = 2; return $this->makeView('revcms.pages.index', 'Pa...
true
a8967ab776debe04d03cc200d88f94469ecb16c6
PHP
mobilejazz-contrib/yii2-api
/app/frontend/models/PasswordResetRequestForm.php
UTF-8
1,520
2.609375
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace frontend\models; use common\models\User; use yii\base\Model; /** * Password reset request form */ class PasswordResetRequestForm extends Model { public $email; /** * @inheritdoc */ public function rules () { return [ ['email', 'filter', 'filter' => 'trim'], ['email'...
true
6e3ebe6c5d9ea851939dcca52c43e0ade43ce04d
PHP
cddsky2014/121
/php20160504/array_keys.php
UTF-8
228
2.828125
3
[]
no_license
<?php $arr1 = array(1,2,3,"name"=>"lucy","age"=>23,"addr"=>"USA"); print_r($arr1); print_r(array_keys($arr1)); function uarray_keys($a){ $arr = array(); foreach($a as $k=>$v){ $arr[]=$k; } return $arr; } ?>
true
5a3e69b98671dc9a55dc4728743fdf5efb07e72f
PHP
medV3dkO/bootcamp
/admin/login.php
UTF-8
4,199
2.53125
3
[]
no_license
<?php if ($_POST['login']!='' && $_POST['pass']!=''){//проверяем что поля не пустые if (strlen($_POST['login'])<=30 && strlen ($_POST['pass'])<= 30){//проверяем чтоб логин и пароль был меньше 30 символов $login = htmlspecialchars($_POST['login']);//убираем спецсимволы $pass = htmlspecialchars($_POST['pass'])...
true
02acd4cbae8054282c69b34610987f6f6d578348
PHP
amsify42/php-domfinder
/tests/TestXML.php
UTF-8
531
2.78125
3
[ "MIT" ]
permissive
<?php namespace Amsify42\Tests; use Amsify42\DOMFinder\DOMFinder; class TestXML { private $domFinder; function __construct() { $this->domFinder = new DOMFinder(getSample('books.xml')); } public function process() { $books = $this->domFinder->getElements('book'); if($books->length) { foreach($books...
true
c826aef2b0721c6bd99c9f626c20cefb41d94848
PHP
chris-peng-1244/otc-cms
/app/Services/Repositories/Customer/CustomerRepository.php
UTF-8
1,017
2.8125
3
[]
no_license
<?php namespace OtcCms\Services\Repositories\Customer; use Illuminate\Contracts\Pagination\Paginator; use Illuminate\Database\Eloquent\Collection; use OtcCms\Models\Customer; class CustomerRepository implements CustomerRepositoryInterface { /** * @param string $customerName * @param array $columns ...
true
f3304a721fa0d0a3a94a8fbe60a86450aa257624
PHP
kuljitsingh94/HTMLParse
/studyGuideGen.php
UTF-8
3,527
3.328125
3
[]
no_license
<?php #give the script the URL to scrape $URLbegin= "https://cs.csubak.edu/~clei/teaching/files/S19_3500/hw"; $URLend = "s.html"; #function that returns an array populated with everything #in between the parameters tag_open and tag_close function tag_contents($string, $tag_open, $tag_close){ foreach (explode($tag...
true
0ea15d126f06d7a3274cdd342b8f1c98a70630c8
PHP
jeyroik/extas-q-crawlers-jira
/src/components/quality/crawlers/jira/JiraIssueChangelogItem.php
UTF-8
762
2.734375
3
[ "MIT" ]
permissive
<?php namespace extas\components\quality\crawlers\jira; use extas\components\Item; use extas\interfaces\quality\crawlers\jira\IJiraIssueChangelogItem; /** * Class JiraIssueChangelogItem * * @package extas\components\quality\crawlers\jira * @author jeyroik@gmail.com */ class JiraIssueChangelogItem extends Item im...
true
1a150ec40f4d58b1d254c01c7345271e475296e9
PHP
LaunaKay/codingdojoserver
/WishList/application/models/M_Wish.php
UTF-8
666
2.625
3
[ "MIT" ]
permissive
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class M_Wish extends CI_Model { public function __construct() { parent::__construct(); } public function addwish($wish) { $id = $this->session->userdata('id'); $wish = array ( ...
true
5ad38c6f4a2be085bef4680975cea39668b6d4b3
PHP
lazyman00/ajsas
/pages/Front_end/allarticle/send_email_1.php
UTF-8
4,324
2.578125
3
[]
no_license
<?php include('../../../connect/connect.php'); ?> <?php require("../../../phpmailer/PHPMailerAutoload.php");?> <?php header('Content-Type: text/html; charset=utf-8'); $sql_article = sprintf("SELECT * FROM `article` left join type_article on article.type_article_id = type_article.type_article_id WHERE `article_id` = %...
true
dd89c7c961bdf80d129c570cdcd9b8654e59cc31
PHP
crebiz76/phptest
/ch19/quiz_result.php
UTF-8
2,004
3.140625
3
[]
no_license
<?php $ans = array($_REQUEST['ex1'], $_REQUEST['ex2'], $_REQUEST['ex3']); require_once('MyDB.php'); $pdo = db_connect(); ?> <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>퀴즈 응시 결과</title> </head> <bod...
true
175bc2a392f215181f29fe73a3201dc91e41b1e4
PHP
boukeversteegh/DecoratorModule
/test/src/Fixtures/Library/lendableTrait.php
UTF-8
246
2.640625
3
[]
no_license
<?php namespace Fixtures\Library; trait lendableTrait { protected $lending_user; public function lendTo(\Fixtures\Entity\User $user) { $this->lending_user = $user; } public function getLendingTo() { return $this->lending_user; } }
true
92600040e18121fbbe05ee90c35734a72af4e6c2
PHP
walterra/J4p5Bundle
/j4p5/parse/easy_parser.php
UTF-8
841
2.53125
3
[]
no_license
<?php namespace Walterra\J4p5Bundle\j4p5\parse; use \Walterra\J4p5Bundle\j4p5\parse\parser; use \Walterra\J4p5Bundle\j4p5\jsly; class easy_parser extends parser { function __construct($pda, $strategy = null) { parent::__construct($pda); $this->call = $this->action; //array(); $this->strat...
true
053035df4f0eb6ebbf8b2f9204d0cf2bdfd3653b
PHP
HouraiSyuto/php_practice
/part2/chapter5/reference_array.php
UTF-8
342
3.65625
4
[]
no_license
<?php function array_pass($array){ $array[0] *= 2; $array[1] *= 2; } function array_pass_ref(&$array){ $array[0] *= 2; $array[1] *= 2; } $a = 10; $b = 20; $array = array($a, $b); array_pass_ref($array); echo $a, PHP_EOL; echo $b, PHP_EOL; $array = array($a, &$b); array_pass($array); echo $a, PHP_...
true
1bb4215e1ae1605c17f0d163193ac2f293ae40c5
PHP
DeschampsManon/Facebook_app
/task.php
UTF-8
4,908
2.59375
3
[]
no_license
<?php require __DIR__.'/loaders/dependencies.php'; require __DIR__.'/loaders/classLoader.php'; require __DIR__.'/loaders/bdd.php'; require 'vendor/phpmailer/phpmailer/PHPMailerAutoload.php'; // On stock la variable fb (api facebook) dans une variable statique MyController::$fb = new Facebook\Facebook([ 'app_id' =...
true
7676e84c098398d2e87756aabc10b5c82ee4077f
PHP
nmusco/assuresign-sdk-php-v2
/src/StructType/PingResult.php
UTF-8
1,265
2.703125
3
[]
no_license
<?php namespace Nmusco\AssureSign\v2\StructType; use \WsdlToPhp\PackageBase\AbstractStructBase; /** * This class stands for PingResult StructType * @subpackage Structs */ class PingResult extends AbstractStructBase { /** * The Success * Meta information extracted from the WSDL * - use: required...
true
c0372bf6d73553f6f6227fe1bd7dcd8672049bd8
PHP
taufik-ashari/slightly-big-Flip
/disburse/getById.php
UTF-8
1,259
2.78125
3
[]
no_license
<?php // required headers header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: access"); header("Access-Control-Allow-Methods: GET"); header("Access-Control-Allow-Credentials: true"); header('Content-Type: application/json'); // include database and object files include_once '../config/data...
true
a3c53217dc2801449e58a72aab1e6d9ff4272f68
PHP
jamesjoel/tss_12_30
/ravi/ci/application/views/admin/view_users.php
UTF-8
1,067
2.53125
3
[]
no_license
<div class="container mt-4 pt-3"> <div class="row"> <div class="col-md-10 offset-md-1"> <h2 class="text-center">View All User</h2> <table class="table table-dark table-hover table-bordered"> <tr> <th>S.No.</th> <th>Full Name</th> <th>Username</th> <th>Con...
true
511c2f3a8e3ce616bc2fa8763ba767747f310b92
PHP
ghuysmans/php-u2flib-server
/examples/pdo/login.php
UTF-8
1,546
2.71875
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
<?php require_once('U2F_Login.php'); class L extends U2F_Login { protected function getUserId() { if (isset($_SESSION['user_id'])) return $_SESSION['user_id']; else return 0; } protected function plaintextLogin($username, $password) { $sel = $this->pdo->prep...
true
66f48156e0cbdf7529838ce463fc6295fde2af12
PHP
HeleneBoivin/PHP_5_Les_tableaux
/exercice1/index.php
UTF-8
537
3.40625
3
[]
no_license
<!DOCTYPE HTML> <html> <head> <title>Exercice1</title> <h3>PHP - Partie 5 - Exercice 1</h3> </head> <body> <p>Créer un tableau months et l'initialiser avec les mois de l'année<p> <?php // $months = array ('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'aout', 'septembre', 'octobre', 'novembre', 'décem...
true
eba7dc0a8bd0a64a96bfc25112b8c15b634e7f43
PHP
salvoab/laravel-comics
/database/seeds/AuthorSeeder.php
UTF-8
459
2.859375
3
[ "MIT" ]
permissive
<?php use App\Author; use Illuminate\Database\Seeder; use Faker\Generator as Faker; class AuthorSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run(Faker $faker) { for ($i=0; $i < 10; $i++) { $author = new Author(); ...
true
c3941a123fc242017610c46abdec247cf902d342
PHP
loveorigami/shop_prototype
/tests/widgets/AdminCreateSubcategoryWidgetTests.php
UTF-8
7,983
2.671875
3
[]
no_license
<?php namespace app\tests\widgets; use PHPUnit\Framework\TestCase; use app\widgets\AdminCreateSubcategoryWidget; use app\forms\AbstractBaseForm; /** * Тестирует класс AdminCreateSubcategoryWidget */ class AdminCreateSubcategoryWidgetTests extends TestCase { private $widget; public function setUp() ...
true
e2e53775768928bcf9bde6fa7b7e4efcc8b8450e
PHP
puterakahfi/MessageBus
/src/Handler/Map/MessageHandlerMap.php
UTF-8
372
2.546875
3
[ "MIT" ]
permissive
<?php namespace SimpleBus\Message\Handler\Map; use SimpleBus\Message\Handler\Map\Exception\NoHandlerForMessageName; use SimpleBus\Message\Handler\MessageHandler; interface MessageHandlerMap { /** * @param string $messageName * @throws NoHandlerForMessageName * @return MessageHandler */ pu...
true
20623fd0931c9d27b0922946fc65488cf2eeee5d
PHP
itsrsy/SocietasPro
/tests/phpunit/Objects/SubscriberTest.php
UTF-8
600
2.71875
3
[]
no_license
<?php /** * Test the subscriber object * * @author Chris Worfolk <chris@societaspro.org> * @package UnitTests * @subpackage Objects */ class SubscriberTest extends PHPUnit_Framework_TestCase { protected $object; protected function setUp () { require_once("../../application/admin/objects/Subscriber.php"); ...
true
8458be938b47bd94a6f91ac19e678f990f2f7493
PHP
5baddi/lifemoz-coding-challenge
/app/Http/Resources/RoomResource.php
UTF-8
752
2.53125
3
[]
no_license
<?php namespace App\Http\Resources; use Carbon\Carbon; use Illuminate\Http\Resources\Json\JsonResource; class RoomResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array */ public function toArray($req...
true
01679d3ad5b3b0c9469e0d0ad55d64fd34eebcf7
PHP
ryanhellyer/auto-xml-backup
/inc/class-auto-xml-backup-admin-notice.php
UTF-8
730
2.6875
3
[]
no_license
<?php /** * Adds an admin notice, alerting the admin that the email address field is blank. */ class Auto_XML_Backup_Admin_Notice extends Auto_XML_Backup_Abstract { /** * Fire the constructor up :) */ public function __construct() { add_action( 'admin_notices', array( $this, 'message' ) ); } /** * Outp...
true
238be97af2f39ad6ad6242aa292efa5a1b7c6d56
PHP
JohnHasmie/restaurant
/classes/Stripe.class.php
UTF-8
1,572
2.640625
3
[]
no_license
<?php class Stripe { protected $stripToken; public function __construct($data) { $this->stripToken = $data['stripeToken']; \Stripe\Stripe::setApiKey('sk_test_51Ie6PpL8uWnAKjvMZ6aZwNXtiuxGyhOlUV8CXKT2JDdflqKXKyfDc96SqAzrwh92xdULc8lCX5lOMh8DSaM2vRzl00W5fOmfHN'); } public functi...
true
a4674ae8bbb11c939aa79caf146362b96f5c693d
PHP
shuvro-zz/Symfony-3-ERPMedical
/src/BackendBundle/Entity/TypeGender.php
UTF-8
2,417
2.859375
3
[ "MIT" ]
permissive
<?php /* Namespace **************************************************************************************************/ namespace BackendBundle\Entity; /* Añadimos el VALIDADOR **************************************************************************************/ /* * Definimos el sistema de validación de los dato...
true
0b33d04a0409e60306cbc57dc3ff29e1cbecc133
PHP
shiroro666/Vaccination_System
/index.php
UTF-8
2,460
2.765625
3
[]
no_license
<!DOCTYPE html> <html> <title>Patient Index Page</title> <?php include ("connectdb.php"); if(!isset($_SESSION["user_id"])) { echo "You are currently not logged in. <br /><br >\n"; echo 'Click <a href="login.php">login</a> to login or <a href="register.php">register</a> if you don\'t have an account yet.<br /><br...
true
6f9fc1a1c7e0ec206a848408924c01cc32ad5374
PHP
KrisoprasEpikuros/unbk
/application/libraries/JalurState/JalurState.php
UTF-8
962
2.90625
3
[]
no_license
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * Description of JalurState * @property CI_Controller $ci * @property StateManager $stateManager * @property JenisSiswaState $jenisSiswaState * * @author m.rap */ abstract class JalurState { protected $ci; protected $stateMan...
true
58bf076ad98b71b8e346dfd194630f9a7fb3ec66
PHP
juanda/curso_php7_ejercicios
/ejercicio3/find.php
UTF-8
625
2.578125
3
[]
no_license
<?php require __DIR__ . '/libs/autoloader.php'; require __DIR__ . '/readline.php'; use Acme\TopSecret\AES256Crypter; use Acme\KeyStorage\KeyFileStorage; use Acme\KeyStorage\KeyRegister; if($argc != 2){ echo "Uso: $argv[0] nombre_registro". PHP_EOL; exit; } $nombreRegistro = $argv[1]; $keyf...
true
060996196d76d763aa438cb253cb743ae79faa4c
PHP
brunocaramelo/estudos
/php/zendframework-modulo-1/estoque/skeleton-application/module/Estoque/src/View/Helper/PaginationHelper.php
UTF-8
711
2.65625
3
[]
no_license
<?php namespace Estoque\View\Helper; use Zend\View\Helper\AbstractHelper; class PaginationHelper extends AbstractHelper{ public function __invoke( $itens , $qtdPagina , $url ){ $this->url = $url; $this->totalItens = $itens->count(); $this->qtdPagina = $qtdPagina; return ...
true
9beaf237f0e7a9706aaf9dec1d58e2b61d188319
PHP
danielkiesshau/WebPractice
/PHP/update.php
UTF-8
1,462
2.6875
3
[]
no_license
<?php require_once("Sql.php"); $sql = new Sql(); //This will result in a query of active drivers to pass to the JS to update the UI $rs = $sql->select("SELECT nome FROM MOTORISTAS WHERE sstatus = :STATUS",array(":STATUS"=>1)); $data = json_encode($rs); $tipo = $_GET['tipo']; setcookie("tabela","1", time() + (400), "/")...
true
ba68d0b1e36147bc60f7aef3497a3be4b8c88e73
PHP
stephenjohndev/renewmember-them-little
/public/_system/php/api/customer/getAgeCounts.php
UTF-8
1,866
2.9375
3
[]
no_license
<?php # Set database parameters require_once $_SERVER['DOCUMENT_ROOT'].'/_system/php/connection/db_connection.php'; require_once $_SERVER['DOCUMENT_ROOT'].'/_system/php/functions/checkAdminToken.php'; try { # Connect to Database $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); ...
true
1acb58be632664fa589152ec5cc990dd5a3f91cb
PHP
stoyantodorovbg/PHP-Web-Development-Basics
/PHP Associate Arrays and Functions - Lab/1 asociativeArrays/1-characterCount.php
UTF-8
561
3.328125
3
[ "MIT" ]
permissive
<?php $word = fgets(STDIN); $word = strtolower($word); $countLetters = []; for ($i = 0; $i < strlen($word); $i++) { if (isset($countLetters[$word[$i]])) { $countLetters[$word[$i]]++; } else { $countLetters[$word[$i]] = 1; } } $result = '['; $counter = 0; foreach ($countLetters as $key => ...
true
e6e4fc27278c55d2ac057e9d68109430ce5fde80
PHP
PhilippeSimier/Gestion_Inscriptions
/administration/authentification/auth.php
UTF-8
2,852
2.6875
3
[]
no_license
<?php if(!isset($_POST['md5'])) { header("Location: ../index.php"); exit(); } if(!isset($_POST['login'])) { header("Location: ../index.php"); exit(); } if($_POST['login']==NULL) { header("Location: ../index.php?&erreur=Requiert un identifiant et un mot de passe."); exi...
true
abf3c72df1963548b31c942011da660ba2779b93
PHP
Mirdrack/prueba
/classes/Vehicles.php
UTF-8
1,123
3.3125
3
[]
no_license
<?php require_once('Vehicle.php'); /** * This class will manage an array of Vehicles object instances */ class Vehicles { private $sql; private $error; private $vehicles; function __construct() { $this->sql = new SqlEngine(); $this->sql->connect(); $this->vehicles = array(); } public function getAll() ...
true
c3dafcdc1cf8cf95f3f50cc73e9b549556d6380c
PHP
andreafiori/php-coding-dojo
/src/algorithms/math/Calculator.php
UTF-8
580
3.859375
4
[]
no_license
<?php namespace algorithms\math; class Calculator { /** * @var int|float */ public $op1; /** * @var int|float */ public $op2; /** * Addition * * @return float|int */ public function add() { return $this->op1 + $this->op2; } /** * Subtraction ...
true
1b2ef6891fc923b4957d5d139c606bad6ac070c7
PHP
845alex845/consultorafisi
/app/model/Escuela.php
UTF-8
414
2.53125
3
[]
no_license
<?php class Escuela{ $cod_facultad; $nom_facultad; $nom_decano; public function obtenerEscuela($cod_facultad){ $sql="SELECT * from facultad where cod_fac=$id"; $conn=oci_connect("consultora","consultora"); $prepare=oci_parse($conn,$sql); oci_execute($p...
true
7e4927d6a3bf4319af1c1f81c32fe84dfdd37481
PHP
puiutucutu/geophp
/src/functions/createUtmFromLatLng.php
UTF-8
339
2.75
3
[]
no_license
<?php use PHPCoord\LatLng; use PHPCoord\RefEll; use PHPCoord\UTMRef; /** * Uses WGS84 ellipsoid. * * @param float $latitude * @param float $longitude * * @return UTMRef */ function createUtmFromLatLng($latitude, $longitude) { $LatLng = new LatLng($latitude, $longitude, 0, RefEll::wgs84()); return $Lat...
true
65919c02274116037b4969c1fc2b4be4854335a1
PHP
mstremante/advent-of-code-2019
/13/part2.php
UTF-8
6,654
3.203125
3
[]
no_license
<?php // Run with php part2.php [input] // If no input file is specified defaults to input.txt in local directory $file = "input.txt"; if(isset($argv[1])) { $file = $argv[1]; } if(file_exists($file)) { $handle = fopen($file, "r"); $opcodes = explode(",", fread($handle, filesize($file))); fclose($hand...
true
f2f9c72ae514b27a23380a13ff1573154b323ea5
PHP
holiday/Validator
/Validator.php
UTF-8
3,175
3.34375
3
[]
no_license
<?php namespace Validator; require_once 'Bootstrapper.php'; require_once 'Rule.php'; class Validator { //stores the rules and options private $rules; //stores the data as key:value pairs private $data; //logs errors for each field private $errors = array(); /** * I...
true
79e5337b912b712e6ab7125bff1865b8e14b86a3
PHP
onenook/helper
/src/string/Sign.php
UTF-8
1,129
3.34375
3
[ "Apache-2.0" ]
permissive
<?php namespace nook\string; class Sign { // ------------------------------ 微信签名 ------------------------------ /** * 生成签名 * @param array $data * @return string */ public static function makeSign(array $data): string { // 签名步骤一:按字典序排序参数 ksort($data); $strin...
true
ee5dddaf65cb860277505b6ba4042b574bcb2e89
PHP
robsli/Web-Apps-TESI-Calendar
/dboperation.php
UTF-8
206
2.6875
3
[ "MIT" ]
permissive
<?php function connectToDB($user, $pw, $dbname){ $dbc = @mysqli_connect("localhost", $user, $pw, $dbname) OR die("Could not connect to MySQL on cscilab: ". mysqli_connect_error()); return $dbc; } ?>
true
2b2e01627f94f73cadbb793c2c9a949f1fdb150b
PHP
pmatiash/shape-drawer
/app/Trapezoid.php
UTF-8
1,647
3.4375
3
[]
no_license
<?php namespace app; /** * Class Trapezoid Shape * @package app */ class Trapezoid extends Shape { private $sideTop; private $sideBottom; private $height; /** * @param int $sideTop * @param int $sideBottom * @param int $height * @param string $color */ public function ...
true
fdd9f6f70ce5ac4c94ed991ca9bb69ddc205093c
PHP
alexdiasgonsales/organizador
/sistema/model/mysql/SessaoMySqlDAO.class.php
UTF-8
6,396
2.625
3
[]
no_license
<?php /** * Classe de operação da tabela 'sessao'. Banco de Dados Mysql. * Estas classes não contemplam meu projeto final, por estarem obsoletas, estou contruindo * novos templates em Persistent Data Object com definição de prepared statements contra * sql injection, utilize para meio de testes, nunca coloque em p...
true
d3a69d76ef83838df21d374dfc259ed02dae7dc8
PHP
activecollab/authentication
/src/AuthenticationResult/Transport/Transport.php
UTF-8
2,630
2.625
3
[ "MIT" ]
permissive
<?php /* * This file is part of the Active Collab Authentication project. * * (c) A51 doo <info@activecollab.com>. All rights reserved. */ declare(strict_types=1); namespace ActiveCollab\Authentication\AuthenticationResult\Transport; use ActiveCollab\Authentication\Adapter\AdapterInterface; use LogicException; ...
true
efc1624d2a3359d12ade6f749b993da717fdf766
PHP
FindMyFriends/api
/App/Domain/Access/PgEntrance.php
UTF-8
1,075
2.75
3
[]
no_license
<?php declare(strict_types = 1); namespace FindMyFriends\Domain\Access; use Klapuch\Storage; /** * Entrance to PG database */ final class PgEntrance implements Entrance { /** @var \Klapuch\Storage\Connection */ private $connection; /** @var \FindMyFriends\Domain\Access\Entrance */ private $origin; public fu...
true
2dfdc1de9ef3792c6a2b1224c967b7a4142e5330
PHP
araiy555/6ch
/getleak/image.movie.php
UTF-8
5,664
2.671875
3
[ "MIT" ]
permissive
<?php $count = count($_FILES['files']['tmp_name']); $errmsg = ""; // エラーメッセージ $gazou = []; $imageset = 0; $dougaset = 0; try { for ($i = 0; $i < $count; $i++) { //ファイル名の取得 $file_name = $_FILES["files"]["type"][$i]; //preg_match関数で判別するファイルの拡張子に「jpg」「jpeg」「png」「gif」が含まれているか確認する if ...
true
2a1ccb95936a4bc640dbb97473ded42ea0c5ec88
PHP
fransaez85/clinica_js
/php/consultaTodosMedicos.php
UTF-8
1,069
2.953125
3
[]
no_license
<?php include_once 'conexion.php'; //consulta todos los registros $query = "SELECT * FROM medico"; $resul = $conexion->query($query); $dimension=$resul->num_rows; if ($dimension>0) { # code... for ($i=0; $i < $dimension; $i++) { $array_fila[] = $resul->fetch_assoc(); $objmedico =$array_fila[$i]; ...
true
05237daf21ec12a0afa44941ca316c219e93a909
PHP
matthewdimatteo/ctrex
/php/content/content-disclosures.php
UTF-8
1,887
2.515625
3
[]
no_license
<?php /* php/content/content-disclosures.php By Matthew DiMatteo, Children's Technology Review This is the content file for the disclosures page It is included dynamically in the file 'php/document.php' */ // PAGE HEADER if($disclosuresHeader != NULL) { echo '<div class = "page-header">'.$disclosuresHeader.'</div>';...
true
51f033530f7c168b50dce06012c036d83587a4c7
PHP
ck6390/CMS
/application/controllers/Attandance_bioMonth.php
UTF-8
8,002
2.515625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* * *****************Welcome.php********************************** * @product name : Global School Management System Pro * @type : Class * @class name : Welcome * @description : This is default class of the application. ...
true
0b216ed27db043f8f090cbd8e10d276b2660b494
PHP
StepanKovalenko/trustly-client-php
/Trustly/Data/jsonrpcrequest.php
UTF-8
7,005
2.8125
3
[ "Apache-2.0", "MIT" ]
permissive
<?php /** * Trustly_Data_JSONRPCRequest class. * * @license https://opensource.org/licenses/MIT * @copyright Copyright (c) 2014 Trustly Group AB */ /* The MIT License (MIT) * * Copyright (c) 2014 Trustly Group AB * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softw...
true
2838764f80fb96c99eac7279a5716585b7f97fcb
PHP
igorbunov/checkbox-in-ua-php-sdk
/src/Models/CashRegisters/CashRegistersQueryParams.php
UTF-8
691
2.75
3
[ "MIT" ]
permissive
<?php namespace igorbunov\Checkbox\Models\CashRegisters; class CashRegistersQueryParams { /** @var bool|null $inUse */ public $inUse; // null, true, false /** @var int $limit */ public $limit; /** @var int $offset */ public $offset; public function __construct( ?bool $inUse = null...
true
fdda5b5b4e22b9510ee83070887ccc9676e2bb32
PHP
thulioprado/api-next
/src/Database/Collection.php
UTF-8
1,488
2.890625
3
[]
no_license
<?php declare(strict_types=1); namespace Directus\Database; use Directus\Contracts\Database\Collection as CollectionContract; use Directus\Contracts\Database\Database as DatabaseContract; use Illuminate\Database\Connection; use Illuminate\Database\Query\Builder; /** * Directus collection. */ class Collection impl...
true
796efcedbc4ed92b5fc7cce81952ff86e2c0c1c7
PHP
ZED-Magdy/PHP-DDD-Blog-exapmle
/src/Domain/Blog/Service/DeleteTagServiceInterface.php
UTF-8
359
2.578125
3
[]
no_license
<?php namespace App\Domain\Blog\Service; use App\Domain\Blog\Exception\TagNotFoundException; use App\Domain\Blog\ValueObject\TagId; interface DeleteTagServiceInterface { /** * Undocumented function * * @param TagId $tagId * @return void * @throws TagNotFoundException */ public f...
true
595f53679ef82e20abefd4a77651a81910d4b5ff
PHP
NatashaAC/HTTP5203_Final_Project-Natasha_Chambers
/views/breed_details.php
UTF-8
2,291
2.578125
3
[]
no_license
<?php // Grabbing the cat breed's name and accounting for spaces $url = 'https://api.thecatapi.com/v1/breeds/search?q=' . str_replace(' ', '%20', $_GET["name"]); $results = json_decode(file_get_contents($url)); $breed_name = $results[0]->name; $breed_alt_name = $results[0]->alt_names; $breed_i...
true
d762a3aa4e638b71e3fe5b5fbfc4ef4e39b18eea
PHP
30002731/6210-SCP
/SCP Files/connection.php
UTF-8
479
2.578125
3
[]
no_license
<?php //Create Database credential variables $user = "a3000273_user"; $password = "Toiohomai1234"; $db = "a3000273_SCP_Files"; //Create php db connection object $connection = new mysqli("localhost", $user, $password, $db) or die(mysqli_error($connection)); //Get all data from table ...
true
28e6a389df275333f7d793ac4f4c64bb54260622
PHP
vkabachenko/yii2-eer
/common/models/Student.php
UTF-8
2,323
2.6875
3
[]
no_license
<?php namespace common\models; use Yii; /** * This is the model class for table "student". * * @property integer $id * @property string $name * @property string $email * * @property StudentEducation[] $studentEducations * @property StudentPortfolio[] $studentPortfolios */ class Student extends \yii\db\Activ...
true
cc5badccabbf19be1208393873734aed98301de5
PHP
michael158/vidafascinante
/modules/Admin/Entities/User.php
UTF-8
2,324
2.6875
3
[ "MIT" ]
permissive
<?php namespace Modules\Admin\Entities; use Illuminate\Auth\Authenticatable; use Illuminate\Database\Eloquent\Model; use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Foundation\Auth\Access\Authorizable; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Au...
true
72e9b344591c4af0f9ecbb3d596a91a086bb3f08
PHP
i80586/RCache
/tests/FileCacheTest.php
UTF-8
2,060
2.703125
3
[]
no_license
<?php use RCache\Cache; use RCache\FileCache; /** * FileCacheTest tests class * Test cache for file * * @author Rasim Ashurov <rasim.ashurov@gmail.com> * @date 11 August, 2016 */ class FileCacheTest extends PHPUnit_Framework_TestCase { /** * @var RCache\Cache */ private $cache; /** ...
true
68e3ff779db20c9b82f6faa6676467330781eafd
PHP
theolaye/symfony2
/src/Entity/User.php
UTF-8
2,312
2.53125
3
[]
no_license
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\UserRepository") */ class User { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) ...
true
099d3679399b42c2ad53f082c008e8f4ada21ea7
PHP
pear/pear-core
/PEAR/Command.php
UTF-8
12,395
2.828125
3
[ "BSD-2-Clause" ]
permissive
<?php /** * PEAR_Command, command pattern class * * PHP versions 4 and 5 * * @category pear * @package PEAR * @author Stig Bakken <ssb@php.net> * @author Greg Beaver <cellog@php.net> * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License ...
true
7cd4bfa1eb3937b09d14801840dc3fb9b94611f2
PHP
toanht15/moni
/apps/classes/brandco/cp/CpInstantWinActionManager.php
UTF-8
9,745
2.5625
3
[]
no_license
<?php AAFW::import('jp.aainc.lib.base.aafwObject'); AAFW::import('jp.aainc.classes.entities.CpAction'); AAFW::import('jp.aainc.classes.services.CpTransactionService'); AAFW::import('jp.aainc.classes.services.instant_win.InstantWinPrizeService'); AAFW::import('jp.aainc.classes.brandco.cp.interface.CpActionManager'); AA...
true
175d34f6241c51d1532d4c12e74fc164b1bee943
PHP
nam-duc-tong/ban_hang_hoa_qua_PHP
/admin/product/add.php
UTF-8
7,054
2.5625
3
[]
no_license
<?php require_once('../../db/dbhelper.php'); $id = $title = $thumbnail = $content = $id_category = $price =''; if(!empty($_POST)){ if(isset($_POST['title'])){ $title = $_POST['title']; $title = str_replace('"', '\\"', $title); } if(isset($_POST['id'])){ ...
true
47cd3e734204dda7140c70f05d31f04dd11f3a81
PHP
renanfvcunha/devsbook
/src/controllers/LoginController.php
UTF-8
4,139
3.015625
3
[]
no_license
<?php namespace src\controllers; use core\Controller; use src\handlers\LoginHandler; use src\handlers\ValidatorsHandler; use src\models\User; /** * Classe que lida com autenticação e * cadastro de usuários */ class LoginController extends Controller { private $loggedUser; /** * Renderização de tela ...
true
d078eed7cea7803640fed404b61e88c41759de3d
PHP
cenpaul07/test_app_laracast
/app/Http/Controllers/PaymentsController.php
UTF-8
1,049
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Events\ProductPurchased; use App\Notifications\PaymentReceived; use Illuminate\Support\Facades\Notification; class PaymentsController extends Controller { public function create() { return view('payment.create'); } public function store() {...
true
39747dfb2595bb13b4eac616a82a09e9ee9fc32d
PHP
ThomasWeinert/carica-firmata
/src/Response/SysEx/PinStateResponse.php
UTF-8
1,453
2.75
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php namespace Carica\Firmata\Response\SysEx { use Carica\Firmata; /** * @property-read int $pin * @property-read int $mode * @property-read int $value */ class PinStateResponse extends Firmata\Response { /** * @var int */ private $_pin; /** * @var int */ priv...
true
303a3ad434f7cf18fdab30209304776becb53670
PHP
alphachoi/duobaohui
/package/search/SearchObject.class.php
UTF-8
8,428
2.875
3
[]
no_license
<?php namespace Snake\Package\Search; /** * 对search操作封装的一个文件 * @author xuanzheng@meilishuo.com * @version alpha */ class SearchObject extends Search{ private $sphinxClient = NULL; private $limit = array(); private $filters = array(); private $filterRanges = array(); private $filterFloatRanges = array(); priv...
true
2ca7813263dcaa8a2153b1fab5cb8140b34671f8
PHP
apuc/guild
/frontend/modules/api/controllers/TaskUserController.php
UTF-8
1,514
2.546875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace frontend\modules\api\controllers; use common\models\ProjectTaskUser; use Yii; use yii\filters\auth\HttpBearerAuth; use yii\rest\Controller; use yii\web\BadRequestHttpException; use yii\web\NotFoundHttpException; class TaskUserController extends ApiController { public function verbs(): array {...
true
f444ca26f7fba9c771148a778c341f5295a4c87b
PHP
nxsaloj/miudl
/app/miudl/Carrera/CarreraValidator.php
UTF-8
2,742
2.65625
3
[ "MIT" ]
permissive
<?php namespace miudl\Carrera; use Validator; class CarreraValidator implements CarreraValidatorInterface { protected $mensajes = array( 'Nombre.required' => 'El campo Nombre no debe estar vacío', 'Apellidos.required' => 'El campo Apellidos no debe estar vacío', 'Ciclos.required' => 'El c...
true
5420b92db3ec20e8f5eda3e3f3a1b5ddbeeb28dc
PHP
kanjengsaifu/erp_bnp
/models/StockModel.php
UTF-8
14,750
2.6875
3
[]
no_license
<?php require_once("BaseModel.php"); class StockModel extends BaseModel{ private $table_name = ""; function __construct(){ if(!static::$db){ static::$db = mysqli_connect($this->host, $this->username, $this->password, $this->db_name); } mysqli_set_charset(static::$db,"utf8")...
true
71b97e151d285faf37567f6df8084405fce87756
PHP
zhangjiquan1/phpsourcecode
/web3d/yuncart/include/common/session.class.php
UTF-8
4,321
2.546875
3
[ "Apache-2.0" ]
permissive
<?php defined('IN_CART') or die; class Session { private $lifetime = 1800; private $session_name = ''; private $session_id = ''; private $session_time = ''; private $session_md5 = ''; private $time = ""; private $initdata = array(); /** * * 构造函数 * ...
true
d1c92ef71291db71bb8916a01a27add5639e1a82
PHP
cyingfan/m3o-php
/src/Model/Routing/RouteOutput.php
UTF-8
1,739
2.984375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace M3O\Model\Routing; use M3O\Model\AbstractModel; class RouteOutput extends AbstractModel { private float $distance; private float $duration; /** @var Waypoint[] */ private array $waypoints; public function getDistance(): float { return $this->...
true
b2b78ec55aff1406eee46b2c68d12ebaaba373a2
PHP
renilsoni/mvc
/Cybercom/Model/Customer/Address.php
UTF-8
432
2.59375
3
[]
no_license
<?php namespace Model\Customer; \Mage::loadFileByClassName('Model\Core\Table'); class Address extends \Model\Core\Table { const STATUS_ENABLED = 1; const STATUS_DISABLED = 0; function __construct() { $this->setTableName('customer_address'); $this->setPrimaryKey('addressId'); } public function getStatus...
true
48912c8a02aa2a3a77c4ad6c30bbc95f20bf5af9
PHP
leanf19/TP_Final_IPOO
/TPFinal/testTeatroFinal.php
UTF-8
10,844
2.953125
3
[]
no_license
<?php require_once ("ORM/Teatro.php"); require_once "ABM_Teatro.php"; require_once "ABM_FuncionMusical.php"; require_once "ABM_FuncionCine.php"; require_once "ABM_FuncionTeatro.php"; //Leandro Gabriel Fuentes FAI-465 Universidad Nacional del Comahue / Carrera TUDW , Materia: IPOO function menu() { do { ec...
true
58c651ebc6c3440354274073de3cab20a3bf4cfe
PHP
lidonghui-ht/poptrip
/Libs/ThirdParty/Ctrip/Hotel/Common/getDate.php
UTF-8
2,363
3.296875
3
[]
no_license
<?php /** * 获取年月日形式的日期(参数为空,输出2012年12月23日;输入分隔符,则输出2012-12-23形式) * cltang 2012年5月11日 携程 * @param $linkChar */ function getDateYMD($linkChar) { date_default_timezone_set('PRC');//设置时区 $coutValue=strlen($linkChar)>0?date("Y".$linkChar."m".$linkChar."d"):date("Y年m月d日"); return $coutValue; } /** * 获取...
true
72957372cfa2e0c22cf0ff14e39ac22178863d07
PHP
Arkos13/auth-service-symfony
/application/src/Infrastructure/User/Repository/NetworkRepository.php
UTF-8
2,163
2.765625
3
[]
no_license
<?php namespace App\Infrastructure\User\Repository; use App\Model\User\Entity\Network; use App\Model\User\Repository\NetworkRepositoryInterface; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NonUniqueResultException; class NetworkRepository implements NetworkRepositoryInterface { private EntityManage...
true
520f4f5118d97a03206dc6a8fe29bab51f6b10e3
PHP
knh/werewolf
/create_game.php
UTF-8
1,917
2.984375
3
[]
no_license
<?php require_once('init.php'); $raw_role_string = $_POST['role_list']; $role_array = preg_split("/(\r\n|\n|\r)/", $raw_role_string); // parse the raw string $role_num_array = array(); //Holds the final result of parsed role_array. $counter = 0; $player_num = 0; //Parse the role_array. Final result is an array[$role...
true
7a53190f49179883fdb49b034066f15c1548e8a1
PHP
makasim/yadm-benchmark
/src/Entity/OrmOrder.php
UTF-8
1,175
2.71875
3
[ "MIT" ]
permissive
<?php namespace YadmBenchmark\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="orders") */ class OrmOrder { /** * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") * * @var integer $id */ private $id; ...
true
9e85ba580f4363fe1b7830365abc96dd83bcf6d8
PHP
michaelvickersuk/laravel-tv-library
/database/migrations/2020_05_06_203601_create_genres_table.php
UTF-8
1,048
2.59375
3
[]
no_license
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; class CreateGenresTable extends Migration { public function up() { Schema::create('genres', function (Blueprint $table) { ...
true
37258cae0c9f72b4856d0d1adaa2843306fc78f9
PHP
rosko/AlmazService
/php/backup/JsonResponseBuilder.php
UTF-8
481
3.109375
3
[]
no_license
<?php include_once 'ResponseBuilder.php'; class JsonResponseBuilder implements ResponseBuilder { private $response = ""; public function makeResponseError($errorType, $errorMsg = '') { $this->response .= "Error " . $errorType . ": " . $errorMsg; } public function addResource($resourc...
true
de54900417e4174abca15868f7b56a9c2cedc232
PHP
798256478/Design-Pattern
/Strategy.php
UTF-8
965
3.6875
4
[]
no_license
<?php /** * 策略模式 * 使用场景:有一个Strategy类, 类中有一个可以直接调用的getData方法 * 返回xml数据,随着业务扩展要求输出json数据,这时就可以使用策略模式 * 根据需求获取返回数据类型 */ class Strategy { protected $arr; function __construct($title, $info) { $this->arr['title'] = $title; $this->arr['info'] = $info; } public function getData($objType) { return $objType-...
true
dcb62df97882fb75c7c6daaecb3568b48b0be456
PHP
lesstif/php-jira-rest-client
/src/ClassSerialize.php
UTF-8
1,318
3.015625
3
[ "Apache-2.0" ]
permissive
<?php namespace JiraRestApi; trait ClassSerialize { /** * class property to Array. * * @param array $ignoreProperties this properties to be (ex|in)cluded from array whether second param is true or false. * @param bool $excludeMode * * @return array */ public function toArra...
true
6d0fa897f2975eb6630c0ba6883559ff1d1d387a
PHP
sdboyer/frozone
/src/Lockable.php
UTF-8
1,128
3.203125
3
[ "MIT" ]
permissive
<?php namespace Frozone; /** * Interface for 'locking', which locks an object's state using a key. * * State can only be unlocked (that is, state can be mutated) by calling the * unlock method with the same key. */ interface Lockable { /** * Locks this object using the provided key. * * The ob...
true
ff83a56fc15e796a6c0e3df81ed1e160ae30036a
PHP
momentphp/framework
/src/CallableResolver.php
UTF-8
1,286
2.875
3
[]
no_license
<?php namespace momentphp; /** * CallableResolver */ class CallableResolver implements \Slim\Interfaces\CallableResolverInterface { use traits\ContainerTrait; /** * Base resolver * * @var \Slim\Interfaces\CallableResolverInterface */ protected $baseResolver; /** * Construc...
true
0187e9344bfe37285930b758eb4d9b0e052d39f1
PHP
DamienKusters/wbsMonitor
/functions/removeProject.php
UTF-8
287
2.515625
3
[]
no_license
<?php include("../connect.php"); $projectId = $_POST["projectId"]; $sql = "DELETE FROM project WHERE id='$projectId'"; if(mysqli_query($conn ,$sql)) { echo "Project removed!"; } else { echo "Error: " . $sql . "<br>" . mysqli_error($conn); } mysqli_close($conn); ?>
true
d805a65f6877fc03a2848a40cc4908fb140a3074
PHP
DMPR-dev/woocommerce-2plus1
/wc_2plus1action/wc_2plus1action.php
UTF-8
2,643
2.953125
3
[ "MIT" ]
permissive
<?php /* Plugin Name: WooCommerce 2+1 Action Description: Purchase 2, get 1 free! This plugin provides an ability to make an action "2+1", each 3rd item on WooCommerce cart produces one free item(the cheapest one on the cart). Author: Dmytro Proskurin Version: 0.0.1 Author URI: http://github.com/DMPR-dev */ namespace W...
true
b92975b84e42d13c5c6157470b829629195587ee
PHP
kerolesgeorge/php-products
/product.php
UTF-8
1,621
2.5625
3
[]
no_license
<?php include_once __DIR__ . '/includes/autoload.php'; $product_id = $_GET['id']; function getProduct($product, $product_id) { return $product->readByID($product_id); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <...
true