A seminal task in quantum information theory is to realize a device able to produce copies of a generic input state with the highest possible output fidelity, thus realizing an optimal quantum cloning machine. Recently, the concept of variational quantum cloning was introduced: a quantum machine learning algorithm through which, by exploiting a classical feedback loop informed by the output of a quantum processing unit, the system can self-learn the programming required for an optimal quantum cloning strategy. In this work, we experimentally implement a variational cloning machine of dual-rail encoded photonic qubits, both for phase-covariant and state-dependent cloning. We exploit a fully programmable 6-mode universal integrated device and classical feedback to reach near-optimal cloning performances. Our results demonstrate the potential of programmable integrated photonic platforms for variational self-learning of quantum algorithms.