Skip to content

secalith-code/zephir-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currently I am waiting for 1.0 to be released.

#Zephir and PHP7 #

In addition to Ubuntu the library re2c is required (included)

*if your host machine is ubuntu-16.04 then download and install vagrant from the vagrant website rather than use system package [https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb]

##Tests ##

###Test 1 ### ArrayDigger supposed to search given array by given (string) path.

###Test 2 ### Padder - array manipulations

###Test 3 ### TBD Php Architect 11/2016 - Victor Bolshov https://github.com/crocodile2u/phparch-zephir/tree/step4

###Test 4 ### TBD Apriori procedure

###Test 5 ### TBD Apriori package codedheartinside/apriori https://packagist.org/packages/codedheartinside/apriori

##Tips ## Zephir does not accept single-quotes. Convert array('index') to array("index") otherwise will not compile.

Every time I do vagrant up I have to make sure that directories

  • ./zephir
  • ./zephir.puphpet/jamjan/.temp/
  • ./zephir.puphpet/jamjan/ext/

are removed.

##Post deployment ## There are post deployment scripts located at ./puphpet/files/startup-always/

######Clone and install Zephir ######

######Build extension ######

  • cd /var/www/zephir && ./install -c
  • cd /var/www/zephir.puphpet/jamjan && sudo zephir build

######Move extension ######

  • touch /home/vagrant/arraydigger.ini && echo "extension=jamjan.so" >> /home/vagrant/arraydigger.ini
  • sudo mv /home/vagrant/arraydigger.ini /etc/php/7.1/mods-available/arraydigger.ini
  • sudo chmod 644 /etc/php/7.1/mods-available/arraydigger.ini
  • sudo chown root:root /etc/php/7.1/mods-available/arraydigger.ini
  • sudo ln -s /etc/php/7.1/mods-available/arraydigger.ini /etc/php/7.1/fpm/conf.d/99-arraydigger.ini

######Restart PHP-FPM ###### sudo systemctl reload php7.1-fpm.service

####Ideas #### Some ideas for future development:

  • Move from Puphpet to pure Vagrant or Docker?
  • In Arraydigger.zep swap isset() with in_array and empty() with null!==
  • Test with frameworks
  • Add function php_pad_simplified() ./zephir.puphpet/public/test.inc.php. Actually convert it to class

About

[WIP] Puphpet env for performance testing: PHP [5.6 and 7.1] vs Zephir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •