3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Email implement JsonSerializable { private $value; public function __construct(string $value) { $this->value = $value; } public function jsonSerialize() { return $this->value; } } $email = new Email('opexus@gmail.com'); echo json_encode(compact('email'));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.150.0070.05718.28
5.6.140.0100.07718.14
5.6.130.0030.06718.18
5.6.120.0030.05020.98
5.6.110.0130.08021.13
5.6.100.0170.06720.99
5.6.90.0070.07021.09
5.6.80.0130.07320.42
5.5.300.0170.07318.05
5.5.290.0030.06318.05
5.5.280.0100.05720.87
5.5.270.0000.05320.86
5.5.260.0070.08020.75
5.5.250.0070.08020.66
5.5.240.0100.06320.27
5.4.450.0100.06319.45
5.4.440.0230.04719.45
5.4.430.0170.05319.28
5.4.420.0270.05019.56
5.4.410.0170.05319.02
5.4.400.0200.04719.12
5.4.390.0070.06719.07
5.4.380.0230.05319.30
5.4.370.0270.04019.24
5.4.360.0130.05719.13
5.4.350.0170.05319.24
5.4.340.0200.05019.05
5.4.320.0170.05318.96
5.4.310.0200.05719.21
5.4.300.0170.05019.21
5.4.290.0170.05319.12
5.4.280.0230.04318.95
5.4.270.0170.04719.18
5.4.260.0100.05718.84
5.4.250.0230.04019.32
5.4.240.0130.05318.82
5.4.230.0230.04718.99
5.4.220.0230.04719.26
5.4.210.0230.04319.21
5.4.200.0070.06019.11
5.4.190.0200.04719.03
5.4.180.0070.05318.84
5.4.170.0070.05718.81
5.4.160.0300.04018.82
5.4.150.0670.06019.28
5.4.140.0500.06016.39
5.4.130.0570.05016.73
5.4.120.0670.04716.61
5.4.110.0430.05316.16
5.4.100.0600.06316.25
5.4.90.0630.04316.61
5.4.80.0500.05316.59
5.4.70.0570.05316.50
5.4.60.0530.05316.59
5.4.50.0470.05016.59
5.4.40.0570.05016.40
5.4.30.0570.04316.22
5.4.20.0600.05016.58
5.4.10.0600.05016.39
5.4.00.0600.05315.84

preferences:
137.83 ms | 1394 KiB | 7 Q