I think how you design your code and what software architecture you use has a larger impact on your performance than the underlying language. In my opinion programmers and software architects make software fast or slow. Ruby and PHP are both interpreted languages which can make code slower than compiled code because a compiler does certain optimizations. But for both PHP and Ruby there exist bytcode caches and compilers.

Answer from Martin Fahl on Stack Overflow
🌐
Programming Language Benchmarks
programming-language-benchmarks.vercel.app › ruby-vs-php
Ruby VS Php benchmarks, Which programming language or compiler is faster
benchmarks,benchmark,performance,binarytrees,coro-prime-sieve,fasta,helloworld,json-serde,lru,merkletrees,nbody,nsieve,pidigits,spectral-norm,Ruby,Ruby lang,Php,Php lang
Discussions

Is ruby Slower than Php in performance benchmarking - Stack Overflow
I am hearing by lots of programmer that Ruby lacks in performance with comparison to php. So i try to find out the real picture behind that i saw this post Why do people say that Ruby is slow? . ... More on stackoverflow.com
🌐 stackoverflow.com
Why should I use Ruby over PHP for web development?
Really, the best web technology isn't a given thing, it's what lets you be productive and enjoy development. Ruby is that for me, It is nice and readable while still being concise, and it has powerful meta-programming. I think it is a very developer friendly language. If that sounds interesting I'd give it a try. More on reddit.com
🌐 r/ruby
53
33
October 9, 2016
Ruby or PHP Worth Learning? : r/cscareerquestions
🌐 r/cscareerquestions
Ruby vs PHP performance - Ruby is slow? No way.
I think it's well realized at this point that PHP is the slowest scripting language of prominence. Ruby ranks just behind Python on generic benchmark websites. But the bottom line is: Who cares? More on reddit.com
🌐 r/rails
5
3
October 28, 2011
🌐
Ruby-Doc.org
ruby-doc.org › home › ruby vs php: which is better?
Ruby vs PHP: Which is Better? - Ruby-Doc.org
July 16, 2025 - Verdict: In most benchmarks, PHP outperforms Ruby, especially in CPU-bound or high-request environments.
🌐
Comentum
comentum.com › ruby-on-rails-vs-php-comparison.html
Ruby on Rails vs PHP Performance Comparison
Comparison of Ruby on Rails vs PHP, performance and speed, scalability, ease of maintenance, cost, support, frequency of update patches and bug fixes, time to deploy, etc.
🌐
HackerNoon
hackernoon.com › ruby-versus-php-who-is-the-winner-l35fj30t5
RUBY versus PHP: Who Is The Winner ? | HackerNoon
August 21, 2019 - programming#ruby-versus-php#ruby#php#web-development#programming-language#latest-tech-stories#php-vs-ruby-performance#laravel-and-symphony
🌐
Quora
quora.com › If-PHP-is-faster-than-Ruby-then-why-is-Rails-faster-than-Laravel-curiosity
If PHP is faster than Ruby, then why is Rails faster than Laravel (curiosity)? - Quora
Answer (1 of 9): Well, a few years ago when I was learning Ruby. I was then an avid PHP programmer, pretty good. I wanted to show once and for all just how slow Ruby actually was. So I made benchmarks of common things to do. Merge arrays, split strings, form, serialize and deserialize json and a...
Find elsewhere
🌐
Railsware
railsware.com › home › engineering › ruby vs. php – in quest of the most suitable programming language for your startup
Ruby vs. PHP - in Quest of the Most Suitable Programming Language for Your Startup
January 31, 2025 - The focus was made at two parameters – the average runtime and the number of code lines. PHP leads in the first parameter, while Ruby gives shorter code. So, we can state that we have no winner in PHP vs.
🌐
Sloboda Studio
sloboda-studio.com › homepage › ruby vs php: the big battle
Ruby vs PHP: The Big Battle - Sloboda Studio
November 29, 2024 - According to Builtwith, a tool that shares which technologies a website is using, there are more than 42 million websites that include PHP as their programming language, whereas the number of websites built with Ruby is much lower, around 14,644.
Rating: 4 ​ - ​ 13 votes
🌐
GitHub
gist.github.com › hipertracker › 734305
Benchmarks Ruby vs Python vs PHP · GitHub
Benchmarks Ruby vs Python vs PHP. GitHub Gist: instantly share code, notes, and snippets.
🌐
PixelCrayons
pixelcrayons.com › dedicated teams › php vs python vs ruby: detailed comparison & analysis
PHP vs Python vs Ruby: Detailed Comparison & Analysis | PixelCrayons™
A programming language with a high learning curve value is easy to understand and has pretty clean codes. Python has the best learning curve among these three languages, PHP comes second, and Ruby-on-rails is last.
Published   January 14, 2026
🌐
Medium
medium.com › geekculture › an-in-depth-investigation-into-php-vs-python-vs-ruby-e8bb66bc64b8
An In-depth Investigation Into PHP Vs Python Vs Ruby | by Amyra Sheldon | Geek Culture | Medium
May 11, 2021 - If we consider PHP usage, its 7th version only has usage of 48.2% of websites. Presently, it has been leveraged in more than 79.0% of websites of the world. At the same time, PHP was released in 1995.
🌐
Monocubed
monocubed.com › blog › ruby-on-rails-vs-php
Ruby on Rails vs PHP: Which One is Best to Consider in 2026?
1 month ago - Compatible: Rails is extremely flexible and functions well with most of the modern frameworks and technologies namely, Ember, AngularJS, and React Native. Such advantages of Ruby help its developers in separating layers of an application and using manifold technologies while developing web apps. PHP is a scripting language that is best suited for web app development.
🌐
Techliance
blog.techliance.com › blog main › php vs ruby: what is better for web development
PHP vs Ruby: What is Better for Web Development in 2020
May 26, 2023 - If there is a head-to-head battle between PHP and Ruby frameworks, then Laravel wins over Ruby on Rails hands down. It is because it provides higher efficiency in processing the code. Especially for web applications such as Facebook, Twitter, etc.
🌐
GitHub
github.com › famzah › langs-performance
GitHub - famzah/langs-performance: C++ vs. Python vs. Perl vs. PHP vs. Java vs. NodeJS vs. Go vs. Ruby vs. Rust vs. Swift vs. D performance benchmark
C++ vs. Python vs. Perl vs. PHP vs. Java vs. NodeJS vs. Go vs. Ruby vs. Rust vs. Swift vs. D performance benchmark - famzah/langs-performance
Starred by 129 users
Forked by 33 users
Languages   Perl 29.0% | Shell 18.4% | C++ 13.8% | Java 9.8% | C# 6.3% | Rust 4.6% | Perl 29.0% | Shell 18.4% | C++ 13.8% | Java 9.8% | C# 6.3% | Rust 4.6%
🌐
Medium
medium.com › railwaymen › rails-vs-php-which-one-is-right-for-your-project-573f64924eaa
Ruby vs. PHP — Which One Is Right for Your Project? | by Railwaymen | Railwaymen | Medium
December 4, 2019 - PHP (Hypertext Processor), gained popularity surprisingly quickly, becoming the most preferable way for web development for a long time. It was made as a scripting language with general-purpose being flexible, fast and pragmatic. Ruby on the other side was made with more general-purpose focusing on simplicity, productivity, and elegance.
🌐
Codica
codica.com › blog › technology › ruby and php: which is the best fit for your startup?
Ruby vs PHP: which is the best choice for your project? | Codica
June 25, 2019 - In this table, you can find the main frameworks of both languages and the number of Github stars. As it shows, Ruby on Rails is the front-runner in the world of Ruby, while in PHP world, Laravel took over the show.
🌐
Kodaps
kodaps.dev › en › blog › php-node-js-python-ruby-what-do-the-statistics-say
PHP vs NodeJS vs Python vs Ruby - What Do The Statistics say?
March 14, 2022 - In last place, PHP with 0 points. In third place, NodeJS with 2 points. In the second position, Python with 3 points. And in the first place, Ruby, with 5 points.