RedBeanPHP is an easy to use ORM for PHP. It's a Zero Config ORM lib that 'automagically' builds your database schema.
: RedBeanPHP 5.3 Beta (Palm Sunday Edition) beta
: RedBeanPHP 5.2 (All Saints Edition) released
: RedBeanPHP 5.1 (Easter Edition)
: RedBeanPHP 5.0 (Halloween Edition)
: RedBeanPHP 4.3.4
: RedBeanPHP 4.3.3
: RedBeanPHP 4.3.2
: RedBeanPHP 4.3.1
: RedBeanPHP 4.3
: RedBeanPHP 4.2.5
This is how you do CRUD in RedBeanPHP:
//for version 5.3 and higher (recommended)
R::useFeatureSet( 'novice/latest' );
$post = R::dispense( 'post' );
$post->text = 'Hello World';
$id = R::store( $post ); //create or update
$post = R::load( 'post', $id ); //retrieve
R::trash( $post ); //delete
This automatically generates the database, tables and columns... on-the-fly. It infers relations based on naming conventions. RedBeanPHP also makes it very easy to work with trees in databases:
$pages = R::children( $site, $extraSQL );
RedBeanPHP uses recursive table expressions to deal with tree structures in your database to improve performance (to use this feature you need a database that supports RCTEs like MySQL 8.0.1+, MariaDB 10.2.2+ or PostgreSQL 9+). Learn more about RedBeanPHP trees.
In RedBeanPHP 5.3 and higher you can use R::useFeatureSet( 'novice/latest' ) to automatically select the latest features. If you are working on an older code base you can ommit this line. The latest keyword means that you want use the latest features. The novice keyword means that some dangerous features like R::nuke() will be turned off. You can also specify a specific RedBeanPHP version like 5.3 (minimum).
No verbose XML files, no annoying annotations, no YAML or INI. Zero Config. Just start coding.
During development, RedBeanPHP will adapt the database schema to fit
your needs, giving you the NoSQL experience.
When deploying to production servers, you can freeze the schema and
benefit from performance gains and referential integrity.
RedBeanPHP offers the best of both worlds!
auto-discovery of models, fast trees,
deep copying and smart import.
Write less, do more!
RedBeanPHP strives to support all ALL Free, Open Source databases.
Currently, RedBeanPHP supports: MySQL, MariaDB, SQLite, PostgreSQL, CUBRID and Firebird/Interbase***. RedBeanPHP supports PHP version 5.2*, 5.3.0-5.3.2**, 5.3.3, 5.4, 5.5, 5.6, 7.0, 7.1,7.2,7.3 and HHVM. We take backward compatibility very serious! RedBeanPHP has a track record of 10 years of PHP language level compatibility without a single breaking change.
*=partial (according to community)
The library has been created in 2009 and is now considered quite mature. No major bugs have been found since 2013 and only minor features have been added in recent years. The code base is being tested with every change, there are over 18000+ unit tests (100% code coverage) for PHP 5.3-7.2 and all supported databases. The project is actively maintained and we take backward compatibility *very* serious. The code is well-documented. RedBeanPHP is trusted by many developers worldwide and has over 1.7 million installs on packagist alone (since 3.5) and almost 2k stars on github. Signify keys are provided.
Download the easy-to-use one-in-all package, one single file containing the entire RedBeanPHP library! No composer, no auto-loaders, no configuration, just download and run! Go to the download page and download to latest version of RedBeanPHP!
RedBeanPHP is written by BDFL Gabor de Mooij and the RedBeanPHP community.
back to main menu
RedBeanPHP Easy ORM for PHP © 2019 Gabor de Mooij
() and the RedBeanPHP community
(credits) - Licensed New BSD/GPLv2 -
RedBeanPHP, the power ORM for PHP since 2009.
RedBeanPHP is part of the GWorx Application Server Platform. GWorx Application Server is a product of Gabor Software © copyright 2019. Learn more about GWorx.